home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 6 / CU Amiga Magazine's Super CD-ROM 06 (1996)(EMAP Images)(GB)(Track 1 of 4)[!][issue 1997-01].iso / cucd / prog / gnu-c / gcc-2.7.0-amiga.diff < prev    next >
Text File  |  1995-08-24  |  141KB  |  4,068 lines

  1. diff -2rcN /usr/goinfre/gcc-2.7.0/Makefile.in gcc-2.7.0-amiga/Makefile.in
  2. *** /usr/goinfre/gcc-2.7.0/Makefile.in    Thu Jun 15 12:01:43 1995
  3. --- gcc-2.7.0-amiga/Makefile.in    Fri Jun 23 11:52:13 1995
  4. ***************
  5. *** 67,74 ****
  6.   SHELL = /bin/sh
  7.   # on sysV, define this as cp.
  8. ! INSTALL = install -c
  9.   # These permit overriding just for certain files.
  10.   INSTALL_PROGRAM = $(INSTALL)
  11.   INSTALL_DATA = $(INSTALL)
  12.   MAKEINFO = makeinfo
  13.   TEXI2DVI = texi2dvi
  14. --- 67,78 ----
  15.   SHELL = /bin/sh
  16.   # on sysV, define this as cp.
  17. ! INSTALL = cp
  18.   # These permit overriding just for certain files.
  19.   INSTALL_PROGRAM = $(INSTALL)
  20.   INSTALL_DATA = $(INSTALL)
  21. + SYMLINK = cp
  22. + # Some systems don't support hardlinks.  For this case, a simple copy
  23. + # will achieve the same results for our purposes.
  24. + HARDLINK = cp
  25.   MAKEINFO = makeinfo
  26.   TEXI2DVI = texi2dvi
  27. ***************
  28. *** 100,104 ****
  29.   
  30.   # Target to use when installing include directory.  Either
  31. ! # install-headers-tar or install-headers-cpio.
  32.   INSTALL_HEADERS_DIR = install-headers-tar
  33.   
  34. --- 104,108 ----
  35.   
  36.   # Target to use when installing include directory.  Either
  37. ! # install-headers-tar or install-headers-cpio or install-headers-cp
  38.   INSTALL_HEADERS_DIR = install-headers-tar
  39.   
  40. ***************
  41. *** 106,110 ****
  42.   # Usually the one we just built.
  43.   # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  44. ! GCC_FOR_TARGET = ./xgcc -B./
  45.   
  46.   # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  47. --- 110,115 ----
  48.   # Usually the one we just built.
  49.   # Don't use this as a dependency--use $(GCC_PASSES) or $(GCC_PARTS).
  50. ! XGCC = xgcc
  51. ! GCC_FOR_TARGET = ./$(XGCC) -B./
  52.   
  53.   # This is used instead of ALL_CFLAGS when compiling with GCC_FOR_TARGET.
  54. ***************
  55. *** 166,175 ****
  56.   # Common prefix for installation directories.
  57.   # NOTE: This directory must exist when you start installation.
  58. ! prefix = /usr/local
  59.   # Directory in which to put localized header files. On the systems with
  60.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  61.   # `/usr'.
  62.   # NOTE: local_prefix *should not* default from prefix.
  63. ! local_prefix = /usr/local
  64.   # Directory in which to put host dependent programs and libraries
  65.   exec_prefix = $(prefix)
  66. --- 171,183 ----
  67.   # Common prefix for installation directories.
  68.   # NOTE: This directory must exist when you start installation.
  69. ! prefix = /gnu
  70.   # Directory in which to put localized header files. On the systems with
  71.   # gcc as the native cc, `local_prefix' may not be `prefix' which is
  72.   # `/usr'.
  73. + # Similar considerations apply for toolkits located on non-writable storage,
  74. + # such as CD-ROM, where we need a completely separate place to put local
  75. + # include files.
  76.   # NOTE: local_prefix *should not* default from prefix.
  77. ! local_prefix = /gnu
  78.   # Directory in which to put host dependent programs and libraries
  79.   exec_prefix = $(prefix)
  80. ***************
  81. *** 672,676 ****
  82.   
  83.   # Dump a specs file to make -B./ read these specs over installed ones.
  84. ! specs: xgcc$(exeext)
  85.       $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
  86.       mv tmp-specs specs
  87. --- 680,684 ----
  88.   
  89.   # Dump a specs file to make -B./ read these specs over installed ones.
  90. ! specs: xgcc$(exeext) xgccv$(exeext)
  91.       $(GCC_FOR_TARGET) -dumpspecs > tmp-specs
  92.       mv tmp-specs specs
  93. ***************
  94. *** 909,914 ****
  95.   # message from ar, we make sure all files are writable.
  96.       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  97. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2))
  98. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext))
  99.       rm -rf tmpcopy
  100.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  101. --- 917,923 ----
  102.   # message from ar, we make sure all files are writable.
  103.       -(cd tmpcopy; chmod +w * > /dev/null 2>&1)
  104. ! # The "cd..; wait" makes sure that the lock on tmpcopy has time to disappear.
  105. !     (cd tmpcopy; $(AR) x ../$(LIBGCC2); cd ..; /c/wait 2)
  106. !     (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *$(objext); cd ..; /c/wait 2)
  107.       rm -rf tmpcopy
  108.       -if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi
  109. ***************
  110. *** 983,990 ****
  111.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  112.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  113. !       GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  114.         GCC_CFLAGS="$(GCC_CFLAGS)"
  115.       -rm -f libobjc.a
  116. !     ln objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  117.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  118.   
  119. --- 992,999 ----
  120.       $(MAKE) -f $${srcdir1}/objc/Makefile libobjc.a \
  121.         srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  122. !       GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  123.         GCC_CFLAGS="$(GCC_CFLAGS)"
  124.       -rm -f libobjc.a
  125. !     $(HARDLINK) objc/libobjc.a . >/dev/null 2>&1 || cp objc/libobjc.a .
  126.       -if $(RANLIB_TEST) ; then $(RANLIB) libobjc.a; else true; fi
  127.   
  128. ***************
  129. *** 996,1000 ****
  130.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  131.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  132. !       GCC_FOR_TARGET="$$thisdir1/xgcc -B$$thisdir1/" \
  133.         GCC_CFLAGS="$(GCC_CFLAGS)"
  134.   
  135. --- 1005,1009 ----
  136.       $(MAKE) -f $$srcdir1/objc/Makefile libobjc.a \
  137.         srcdir=$$srcdir1 tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  138. !       GCC_FOR_TARGET="$$thisdir1/$(XGCC) -B$$thisdir1/" \
  139.         GCC_CFLAGS="$(GCC_CFLAGS)"
  140.   
  141. ***************
  142. *** 1050,1054 ****
  143.   ld: collect2
  144.       rm -f ld$(exeext)
  145. !     ln collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
  146.          || cp collect2$(exeext) ld$(exeext)
  147.   
  148. --- 1059,1063 ----
  149.   ld: collect2
  150.       rm -f ld$(exeext)
  151. !     $(HARDLINK) collect2$(exeext) ld$(exeext) > /dev/null 2>&1 \
  152.          || cp collect2$(exeext) ld$(exeext)
  153.   
  154. ***************
  155. *** 1573,1577 ****
  156.   cpp: $(CCCP)
  157.       -rm -f cpp$(exeext)
  158. !     ln $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
  159.        || cp $(CCCP)$(exeext) cpp$(exeext)
  160.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  161. --- 1582,1586 ----
  162.   cpp: $(CCCP)
  163.       -rm -f cpp$(exeext)
  164. !     $(HARDLINK) $(CCCP)$(exeext) cpp$(exeext) > /dev/null 2>&1 \
  165.        || cp $(CCCP)$(exeext) cpp$(exeext)
  166.   cccp: cccp.o cexp.o version.o $(LIBDEPS)
  167. ***************
  168. *** 1756,1760 ****
  169.       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  170.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  171. !     GCC_FOR_TARGET="$${thisdir1}/xgcc -B$${thisdir1}/" \
  172.       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  173.       touch objc-headers
  174. --- 1765,1769 ----
  175.       $(MAKE) -f $${srcdir1}/objc/Makefile copy-headers \
  176.       srcdir=$${srcdir1} tooldir=$(tooldir) AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \
  177. !     GCC_FOR_TARGET="$${thisdir1}/$(XGCC) -B$${thisdir1}/" \
  178.       GCC_CFLAGS="$(GCC_CFLAGS)" incinstalldir=$${thisdir1}/include
  179.       touch objc-headers
  180. ***************
  181. *** 1942,1945 ****
  182. --- 1951,1955 ----
  183.       -rm -fr stage1 stage2 stage3 stage4
  184.       -rm -f */stage1 */stage2 */stage3 */stage4 */include
  185. +     -rm -f cp-parse.output
  186.       -rm -f objc-parse.output
  187.       -rm -f c-parse.output
  188. ***************
  189. *** 2083,2087 ****
  190.         $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
  191.         rm -f $(bindir)/$(target)-gcc-1$(exeext); \
  192. !       ln $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
  193.           > /dev/null 2>&1 \
  194.           || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
  195. --- 2093,2097 ----
  196.         $(INSTALL_PROGRAM) xgcc$(exeext) $(bindir)/$(GCC_INSTALL_NAME)$(exeext); \
  197.         rm -f $(bindir)/$(target)-gcc-1$(exeext); \
  198. !       $(HARDLINK) $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext) \
  199.           > /dev/null 2>&1 \
  200.           || cp $(bindir)/$(GCC_INSTALL_NAME)$(exeext) $(bindir)/$(target)-gcc-1$(exeext); \
  201. ***************
  202. *** 2154,2158 ****
  203.           if expr "$$dest" : "$$dir.*" > /dev/null; then \
  204.             rm -f $(libsubdir)/include/$$i; \
  205. !           ln -s `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  206.           fi; \
  207.         done; \
  208. --- 2164,2168 ----
  209.           if expr "$$dest" : "$$dir.*" > /dev/null; then \
  210.             rm -f $(libsubdir)/include/$$i; \
  211. !           $(SYMLINK) `echo $$i | sed "s|/[^/]*|/..|g" | sed 's|/..$$||'``echo "$$dest" | sed "s|$$dir||"` $(libsubdir)/include/$$i; \
  212.           fi; \
  213.         done; \
  214. ***************
  215. *** 2177,2180 ****
  216. --- 2187,2194 ----
  217.       (cd include; find . -print) | (cd include; cpio -pdum $(libsubdir)/include)
  218.   
  219. + # Install the include directory using simple recursive copy.
  220. + install-headers-cp: stmp-headers install-include-dir
  221. +     cd include; cp -r . $(libsubdir)/include
  222.   # Put assert.h where it won't override GNU libc's assert.h.
  223.   # It goes in a dir that is searched after GNU libc's headers;
  224. ***************
  225. *** 2269,2273 ****
  226.       mkdir tmp/objc
  227.       for file in *[0-9a-zA-Z+]; do \
  228. !       ln $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  229.       done
  230.       cd config; \
  231. --- 2283,2287 ----
  232.       mkdir tmp/objc
  233.       for file in *[0-9a-zA-Z+]; do \
  234. !       $(HARDLINK) $$file tmp > /dev/null 2>&1 || cp $$file tmp; \
  235.       done
  236.       cd config; \
  237. ***************
  238. *** 2277,2286 ****
  239.           cd $$file; \
  240.           for subfile in *[0-9a-zA-Z+]; do \
  241. !           ln $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  242.             || cp $$subfile ../../tmp/config/$$file; \
  243.           done; \
  244.           cd ..; \
  245.         else \
  246. !         ln $$file ../tmp/config >/dev/null 2>&1 \
  247.           || cp $$file ../tmp/config; \
  248.         fi; \
  249. --- 2291,2300 ----
  250.           cd $$file; \
  251.           for subfile in *[0-9a-zA-Z+]; do \
  252. !           $(HARDLINK) $$subfile ../../tmp/config/$$file >/dev/null 2>&1 \
  253.             || cp $$subfile ../../tmp/config/$$file; \
  254.           done; \
  255.           cd ..; \
  256.         else \
  257. !         $(HARDLINK) $$file ../tmp/config >/dev/null 2>&1 \
  258.           || cp $$file ../tmp/config; \
  259.         fi; \
  260. ***************
  261. *** 2288,2299 ****
  262.       cd ginclude; \
  263.       for file in *[0-9a-zA-Z+]; do \
  264. !       ln $$file ../tmp/ginclude >/dev/null 2>&1 \
  265.          || cp $$file ../tmp/ginclude; \
  266.       done
  267.       cd objc; \
  268.       for file in *[0-9a-zA-Z+]; do \
  269. !       ln $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  270.       done
  271. !     ln .gdbinit tmp
  272.   
  273.   # Finish making `distdir', after the languages have done their thing.
  274. --- 2302,2313 ----
  275.       cd ginclude; \
  276.       for file in *[0-9a-zA-Z+]; do \
  277. !       $(HARDLINK) $$file ../tmp/ginclude >/dev/null 2>&1 \
  278.          || cp $$file ../tmp/ginclude; \
  279.       done
  280.       cd objc; \
  281.       for file in *[0-9a-zA-Z+]; do \
  282. !       $(HARDLINK) $$file ../tmp/objc >/dev/null 2>&1 || cp $$file ../tmp/objc; \
  283.       done
  284. !     $(HARDLINK) .gdbinit tmp
  285.   
  286.   # Finish making `distdir', after the languages have done their thing.
  287. ***************
  288. *** 2330,2344 ****
  289.   # because alloca.o is newer, we permit these recursive makes to compile
  290.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  291. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  292.       $(MAKE) stage2
  293. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  294.   
  295.   bootstrap2: force
  296. !     $(MAKE) CC="stage1/xgcc -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  297.       $(MAKE) stage2
  298. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  299.   
  300.   bootstrap3: force
  301. !     $(MAKE) CC="stage2/xgcc -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  302.   
  303.   # Compare the object files in the current directory with those in the
  304. --- 2344,2358 ----
  305.   # because alloca.o is newer, we permit these recursive makes to compile
  306.   # alloca.o.  Then cc1 is newer, so it won't have to be relinked.
  307. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  308.       $(MAKE) stage2
  309. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  310.   
  311.   bootstrap2: force
  312. !     $(MAKE) CC="stage1/$(XGCC) -Bstage1/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage1/ LANGUAGES="$(LANGUAGES)"
  313.       $(MAKE) stage2
  314. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  315.   
  316.   bootstrap3: force
  317. !     $(MAKE) CC="stage2/$(XGCC) -Bstage2/" CFLAGS="$(BOOT_CFLAGS)" LDFLAGS="$(BOOT_LDFLAGS)" libdir=$(libdir) STAGE_PREFIX=stage2/ LANGUAGES="$(LANGUAGES)"
  318.   
  319.   # Compare the object files in the current directory with those in the
  320. ***************
  321. *** 2415,2426 ****
  322.       -for dir in . $(SUBDIRS) ; \
  323.        do \
  324. !        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi ; \
  325.        done
  326.       -mv $(STAGESTUFF) stage1
  327.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  328.   # dir will work properly.
  329. !     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
  330. !     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
  331. !     -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
  332.       -rm -f stage1/libgcc.a
  333.       -cp libgcc.a stage1
  334. --- 2429,2440 ----
  335.       -for dir in . $(SUBDIRS) ; \
  336.        do \
  337. !        if [ -d stage1/$$dir ] ; then true ; else mkdir stage1/$$dir ; fi; \
  338.        done
  339.       -mv $(STAGESTUFF) stage1
  340.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  341.   # dir will work properly.
  342. !     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage1 || cp as$(exeext) stage1 ; else true ; fi
  343. !     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage1 || cp ld$(exeext) stage1 ; else true ; fi
  344. !     -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage1 || cp collect-ld$(exeext) stage1 ; else true ; fi
  345.       -rm -f stage1/libgcc.a
  346.       -cp libgcc.a stage1
  347. ***************
  348. *** 2432,2443 ****
  349.       -for dir in . $(SUBDIRS) ; \
  350.        do \
  351. !        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi ; \
  352.        done
  353.       -mv $(STAGESTUFF) stage2
  354.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  355.   # dir will work properly.
  356. !     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
  357. !     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
  358. !     -if [ -f collect-ld ] ; then ln -s ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
  359.       -rm -f stage2/libgcc.a
  360.       -cp libgcc.a stage2
  361. --- 2446,2457 ----
  362.       -for dir in . $(SUBDIRS) ; \
  363.        do \
  364. !        if [ -d stage2/$$dir ] ; then true ; else mkdir stage2/$$dir ; fi; \
  365.        done
  366.       -mv $(STAGESTUFF) stage2
  367.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  368.   # dir will work properly.
  369. !     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage2 || cp as$(exeext) stage2 ; else true ; fi
  370. !     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage2 || cp ld$(exeext) stage2 ; else true ; fi
  371. !     -if [ -f collect-ld ] ; then $(SYMLINK) ../collect-ld$(exeext) stage2 || cp collect-ld$(exeext) stage2 ; else true ; fi
  372.       -rm -f stage2/libgcc.a
  373.       -cp libgcc.a stage2
  374. ***************
  375. *** 2449,2460 ****
  376.       -for dir in . $(SUBDIRS) ; \
  377.        do \
  378. !        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi ; \
  379.        done
  380.       -mv $(STAGESTUFF) stage3
  381.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  382.   # dir will work properly.
  383. !     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
  384. !     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
  385. !     -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
  386.       -rm -f stage3/libgcc.a
  387.       -cp libgcc.a stage3
  388. --- 2463,2474 ----
  389.       -for dir in . $(SUBDIRS) ; \
  390.        do \
  391. !        if [ -d stage3/$$dir ] ; then true ; else mkdir stage3/$$dir ; fi; \
  392.        done
  393.       -mv $(STAGESTUFF) stage3
  394.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  395.   # dir will work properly.
  396. !     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage3 || cp as$(exeext) stage3 ; else true ; fi
  397. !     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage3 || cp ld$(exeext) stage3 ; else true ; fi
  398. !     -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage3 || cp collect-ld$(exeext) stage3 ; else true ; fi
  399.       -rm -f stage3/libgcc.a
  400.       -cp libgcc.a stage3
  401. ***************
  402. *** 2466,2477 ****
  403.       -for dir in . $(SUBDIRS) ; \
  404.        do \
  405. !        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi ; \
  406.        done
  407.       -mv $(STAGESTUFF) stage4
  408.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  409.   # dir will work properly.
  410. !     -if [ -f as$(exeext) ] ; then ln -s ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
  411. !     -if [ -f ld$(exeext) ] ; then ln -s ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
  412. !     -if [ -f collect-ld$(exeext) ] ; then ln -s ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
  413.       -rm -f stage4/libgcc.a
  414.       -cp libgcc.a stage4
  415. --- 2480,2491 ----
  416.       -for dir in . $(SUBDIRS) ; \
  417.        do \
  418. !        if [ -d stage4/$$dir ] ; then true ; else mkdir stage4/$$dir ; fi; \
  419.        done
  420.       -mv $(STAGESTUFF) stage4
  421.   # Copy as/ld if they exist to stage dir, so that running xgcc from the stage
  422.   # dir will work properly.
  423. !     -if [ -f as$(exeext) ] ; then $(SYMLINK) ../as$(exeext) stage4 || cp as$(exeext) stage4 ; else true ; fi
  424. !     -if [ -f ld$(exeext) ] ; then $(SYMLINK) ../ld$(exeext) stage4 || cp ld$(exeext) stage4 ; else true ; fi
  425. !     -if [ -f collect-ld$(exeext) ] ; then $(SYMLINK) ../collect-ld$(exeext) stage4 || cp collect-ld$(exeext) stage4 ; else true ; fi
  426.       -rm -f stage4/libgcc.a
  427.       -cp libgcc.a stage4
  428. diff -2rcN /usr/goinfre/gcc-2.7.0/Product-Info gcc-2.7.0-amiga/Product-Info
  429. *** /usr/goinfre/gcc-2.7.0/Product-Info
  430. --- gcc-2.7.0-amiga/Product-Info    Fri Jun 23 11:52:13 1995
  431. ***************
  432. *** 0 ****
  433. --- 1,22 ----
  434. + .name
  435. + gcc
  436. + .fullname
  437. + GNU C/C++/Objective-C compiler
  438. + .type
  439. + Compiler
  440. + .short
  441. + GNU C/C++/Obj-C compilers.
  442. + .description
  443. + The GNU C, C++, and Objective C compilers.  Includes all support for
  444. + compiling C, C++ and Objective C, including a run-time library for
  445. + Objective C.
  446. + .version
  447. + 2.6.4
  448. + .author
  449. + Free Software Foundation
  450. + .requirements
  451. + Amiga binaries require ixemul.library.
  452. + .distribution
  453. + GNU Public License
  454. + .described-by
  455. + Fred Fish (fnf@amigalib.com)
  456. diff -2rcN /usr/goinfre/gcc-2.7.0/amigasup.c gcc-2.7.0-amiga/amigasup.c
  457. *** /usr/goinfre/gcc-2.7.0/amigasup.c
  458. --- gcc-2.7.0-amiga/amigasup.c    Fri Jun 23 11:52:14 1995
  459. ***************
  460. *** 0 ****
  461. --- 1,171 ----
  462. + /* Supplementary host support for AmigaDOS.  Used only when host is AmigaDOS.
  463. +    Copyright (C) 1994 Free Software Foundation, Inc.
  464. + This file is part of GNU CC.
  465. + GNU CC is free software; you can redistribute it and/or modify
  466. + it under the terms of the GNU General Public License as published by
  467. + the Free Software Foundation; either version 2, or (at your option)
  468. + any later version.
  469. + GNU CC is distributed in the hope that it will be useful,
  470. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  471. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  472. + GNU General Public License for more details.
  473. + You should have received a copy of the GNU General Public License
  474. + along with GNU CC; see the file COPYING.  If not, write to
  475. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  476. + This code segment will interface between the startup code and the user's
  477. + main(), adjusting the stack if necessary. Two entry points are provided,
  478. + main(), and stkexit(). Programs should be compiled using
  479. +     gcc -Dmain=stkmain -Dexit=stkexit
  480. + and linked with this module.  Calling _exit is not provided for, but should
  481. + be trivial to implement.
  482. + The minimum acceptable stack size is obtained from the environment variable
  483. + GCC_STACK (change the #define ENVNAME to customize). If this variable is
  484. + not defined, the default is 50000 bytes (change the #define SIZE to
  485. + customize). If the current stack size is less than the minimum acceptable,
  486. + then a new stack is allocated, and appropriate actions are taken to ensure
  487. + that the original stack is restored before exit.
  488. + To link with my stderrfix hack, you will need to compile it using
  489. +        gcc -Dmain=stkmain -c stderrfix.c
  490. + and compile everything else (apart from this file) using
  491. +        gcc -Dmain=mymain -Dexit=stkexit
  492. + (I have not tested this, but there is no reason why it shouldn't work.)
  493. + AUTHOR:     Kriton Kyrimis (kyrimis@theseas.ntua.gr)
  494. + KNOWN BUGS: Calling stkexit(0x8000000) will cause the program to exit
  495. +             with the wrong exit code (0).
  496. + DISCLAIMER: Use this code at your own risk.
  497. + */
  498. + /* Putting this in version.c seems to screw up configure, which attempts to
  499. +    extract the version number with a sed command that doesn't take this
  500. +    string into account.  Also, don't include the date of compilation
  501. +    in this string because the annoyance of not being able to do multistage
  502. +    build comparisons across days is more than the convenience gained
  503. +    (if any) by having the build date incoporated in the executables. -fnf */
  504. + char VERSION[]="$VER:gcc 2.6.4";
  505. + #undef main
  506. + #undef exit
  507. + #include <stdlib.h>
  508. + #include <setjmp.h>
  509. + #include <dos/dosextens.h>
  510. + #include <proto/exec.h>
  511. + #include <proto/dos.h>
  512. + #define SIZE 50000
  513. + #define ENVNAME "GCCSTACK"
  514. + #define MAGIC 0x80000000
  515. + void stkexit(int);
  516. + static jmp_buf jmp;
  517. + static int swapped = 0;
  518. + main(int argc, char **argv)
  519. + {
  520. +   /* Declare all variables as static, so that they are available no matter
  521. +      which stack is active */
  522. +   static struct Process *p;
  523. +   static struct CommandLineInterface *c;
  524. +   static int stacksize, prefsize, status;
  525. +   static struct StackSwapStruct stack;
  526. +   static char *envsize, *newstack;
  527. +   /* The next two variables point to information in the old stack. Declare
  528. +      them volatile, to avoid unexpected surprises introduced by the optimizer.
  529. +      (This is apparently unnecessary under 2.6.1, but you never know.) */
  530. +   static volatile int myargc;
  531. +   static volatile char **myargv;
  532. +   /* Determine original stack size */
  533. +   p = (struct Process *)FindTask(NULL);
  534. +   c = BADDR(p->pr_CLI);
  535. +   if (c) {
  536. +     stacksize = c->cli_DefaultStack * sizeof(LONG);
  537. +   }else{
  538. +     stacksize = p->pr_StackSize;
  539. +   }
  540. +   /* Determine preferred stack size */
  541. +   envsize = getenv(ENVNAME);
  542. +   if (envsize) {
  543. +     prefsize = atoi(envsize);
  544. +   }else{
  545. +     prefsize = SIZE;
  546. +   }
  547. +   myargc = argc;
  548. +   myargv = argv;
  549. +   if (prefsize > stacksize) {
  550. +     /* Round size to next long word */
  551. +     prefsize = ((prefsize + (sizeof(LONG) - 1)) / sizeof(LONG)) * sizeof(LONG);
  552. +     /* Allocate new stack */
  553. +     newstack = malloc(prefsize);
  554. +     if (!newstack) {
  555. +       Printf("Can't allocate new stack!\n");
  556. +       exit(RETURN_FAIL);
  557. +     }
  558. +     /* Build new stack structure */
  559. +     stack.stk_Lower = newstack;
  560. +     stack.stk_Upper = (ULONG)newstack + prefsize;
  561. +     /* Determine the address the stackpointer has to go:
  562. +      * Point to the last longword of the stackframe and subtract
  563. +      * the arguments of StackSwap() since the compiler might
  564. +      * try to adjust the stackpointer after calling it :-(.
  565. +      */
  566. +     stack.stk_Pointer = (APTR)(stack.stk_Upper-2*sizeof(long));
  567. +     /* Switch to new stack */
  568. +     StackSwap(&stack);
  569. +     swapped = 1;
  570. +     if (c) {
  571. +       c->cli_DefaultStack = prefsize / sizeof(LONG);
  572. +     }
  573. +     /* Save the current position, so that on exit we may return to the exact
  574. +        stack depth where we switched stacks, and switch them back again.
  575. +        Programs should invoke stkexit() rather than exit(), or return from
  576. +        stkmain(). Status contains the exit status given to stkexit().*/
  577. +     if ((status = setjmp(jmp)) != 0) {
  578. +       /* Switch back to old stack before exiting */
  579. +       StackSwap(&stack);
  580. +       if (c) {
  581. +     c->cli_DefaultStack = stacksize / sizeof(LONG);
  582. +       }
  583. +       free(newstack);
  584. +       if (status == MAGIC) {    /* If real exit status is 0, stkexit converts */
  585. +         status = 0;        /* it to MAGIC, to avoid confusing setjmp */
  586. +       }
  587. +       exit(status);
  588. +     }
  589. +     status = stkmain(myargc, myargv);
  590. +     stkexit(status);
  591. +   } else {
  592. +     return stkmain(myargc, myargv);
  593. +   }
  594. + }
  595. + void
  596. + stkexit(int status)
  597. + {
  598. +   if (!swapped) {
  599. +     exit (status);
  600. +   } else {
  601. +     if (status == 0) {    /* The world will end iff we pass 0 as the value */
  602. +       status = MAGIC;    /* for longjmp */
  603. +     }
  604. +     longjmp(jmp, status);
  605. +   }
  606. + }
  607. diff -2rcN /usr/goinfre/gcc-2.7.0/calls.c gcc-2.7.0-amiga/calls.c
  608. *** /usr/goinfre/gcc-2.7.0/calls.c    Thu Jun 15 12:15:32 1995
  609. --- gcc-2.7.0-amiga/calls.c    Fri Jun 23 11:52:15 1995
  610. ***************
  611. *** 2264,2267 ****
  612. --- 2264,2275 ----
  613.     argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
  614.   
  615. + #if defined (__amigados__)
  616. + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
  617. + #ifdef ENCODE_SECTION_INFO
  618. +   /* mark it as a function (to be in the text section that is) */
  619. +   SYMBOL_REF_FLAG (fun) = 1;
  620. + #endif
  621. + #endif
  622.     INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
  623.   
  624. ***************
  625. *** 2572,2575 ****
  626. --- 2580,2591 ----
  627.     argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
  628.   
  629. + #if defined (__amigados__)
  630. + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
  631. + #ifdef ENCODE_SECTION_INFO
  632. +   /* mark it as a function (to be in the text section that is) */
  633. +   SYMBOL_REF_FLAG (fun) = 1;
  634. + #endif
  635. + #endif
  636.     INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
  637.   
  638. diff -2rcN /usr/goinfre/gcc-2.7.0/cccp.c gcc-2.7.0-amiga/cccp.c
  639. *** /usr/goinfre/gcc-2.7.0/cccp.c    Thu Jun 15 12:16:31 1995
  640. --- gcc-2.7.0-amiga/cccp.c    Sun Jun 25 15:41:07 1995
  641. ***************
  642. *** 41,44 ****
  643. --- 41,62 ----
  644.   #endif /* not EMACS */
  645.   
  646. + #ifdef INHIBIT_ALLOCA_USE
  647. + /* Since cpp uses alloca to store all its read files, this is quite deadly
  648. +    on a system with non-automatic stackgrowth like amigados, so we better
  649. +    turn it off now.  Normally alloca is #defined to __builtin_alloca, so
  650. +    undefining it causes an external alloca to be used.
  651. +    Note that it's not wise to generally inhibit __builtin_alloca, since
  652. +    using the generic emulator results in a serious (!) speed penalty, and
  653. +    it's bad enough that we have to live with it in cccp, don't make cc1
  654. +    unbearably slow as well... */
  655. + #undef alloca
  656. + #endif
  657. + #ifdef __amigados__
  658. + static int amigados_abs_filename ();
  659. + #endif
  660.   #ifndef STANDARD_INCLUDE_DIR
  661.   #define STANDARD_INCLUDE_DIR "/usr/include"
  662. ***************
  663. *** 361,364 ****
  664. --- 379,390 ----
  665.   static int max_include_len;
  666.   
  667. + #ifdef __amigados__
  668. + /* Phil.B: 03-Oct-94 Flag indicating process priority */
  669. + static int amiga_priority = -1;
  670. + static int amiga_old_priority;
  671. + #include <proto/exec.h>
  672. + struct Task *amiga_task;
  673. + #endif /* __amigados__ */
  674.   /* Nonzero means turn NOTREACHED into #pragma NOTREACHED etc */
  675.   
  676. ***************
  677. *** 1311,1314 ****
  678. --- 1337,1349 ----
  679.   #endif /* RLIMIT_STACK defined */
  680.   
  681. + #ifdef __amigados__
  682. +   {
  683. +     char *envstr;
  684. +     if (envstr = getenv("GCCPRIORITY"))
  685. +       if (((i = atoi(envstr)) > -20) && (i < 20)) amiga_priority = i;
  686. +   }
  687. + #endif /* __amigados__ */
  688.   #ifdef SIGPIPE
  689.     signal (SIGPIPE, pipe_closed);
  690. ***************
  691. *** 1320,1323 ****
  692. --- 1355,1361 ----
  693.        && cp[-1] != DIR_SEPARATOR
  694.   #endif
  695. + #ifdef VOL_SEPARATOR
  696. +      && cp[-1] != VOL_SEPARATOR
  697. + #endif
  698.        )
  699.       --cp;
  700. ***************
  701. *** 1519,1522 ****
  702. --- 1557,1570 ----
  703.   
  704.         case 'p':
  705. + #ifdef __amigados__
  706. +     if (!strcmp (argv[i], "-priority")) {
  707. +       if (i + 1 == argc)
  708. +         fatal ("Priority missing after -P option");
  709. +           if ((amiga_priority = atoi(argv[++i])) < -25)
  710. +         amiga_priority = -25;
  711. +           else if (amiga_priority > 25)
  712. +         amiga_priority = 25;
  713. +         } else
  714. + #endif /* __amigados__ */
  715.       if (!strcmp (argv[i], "-pedantic"))
  716.         pedantic = 1;
  717. ***************
  718. *** 1808,1811 ****
  719. --- 1856,1866 ----
  720.     }
  721.   
  722. + #ifdef __amigados__
  723. +   Forbid();
  724. +   amiga_task = FindTask(NULL);
  725. +   Permit();
  726. +   amiga_old_priority = SetTaskPri(amiga_task, amiga_priority);
  727. + #endif /* __amigados__ */
  728.     /* Add dirs from CPATH after dirs from -I.  */
  729.     /* There seems to be confusion about what CPATH should do,
  730. ***************
  731. *** 2166,2169 ****
  732. --- 2221,2227 ----
  733.   
  734.         /* Discard all directory prefixes from filename.  */
  735. + #ifdef FILE_NAME_NONDIRECTORY
  736. +       q = FILE_NAME_NONDIRECTORY (in_fname);
  737. + #else
  738.         if ((q = rindex (in_fname, '/')) != NULL
  739.   #ifdef DIR_SEPARATOR
  740. ***************
  741. *** 2174,2178 ****
  742.         else
  743.       q = in_fname;
  744.         /* Copy remainder to mungable area.  */
  745.         p = (char *) alloca (strlen(q) + 8);
  746. --- 2232,2236 ----
  747.         else
  748.       q = in_fname;
  749. ! #endif
  750.         /* Copy remainder to mungable area.  */
  751.         p = (char *) alloca (strlen(q) + 8);
  752. ***************
  753. *** 2329,2332 ****
  754. --- 2387,2395 ----
  755.       fatal ("I/O error on output");
  756.   
  757. + /* PhB 25-Jun-95: restore old process priority before exiting */
  758. + #ifdef __amigados__
  759. +   SetTaskPri(amiga_task, amiga_old_priority);
  760. + #endif /* __amigados__ */
  761.     if (errors)
  762.       exit (FATAL_EXIT_CODE);
  763. ***************
  764. *** 4007,4011 ****
  765. --- 4070,4079 ----
  766.         if (!no_output && already_output == 0
  767.         && (kt->pass_thru
  768. + /* Phil.B 27-Mar-93 not quite sure to keep this old fix */      
  769. + #if defined (__amigados__) && 0
  770. +           || ((kt->type == T_DEFINE || kt->type == T_UNDEF)
  771. + #else
  772.             || (kt->type == T_DEFINE
  773. + #endif /* __amigados__ */
  774.             && (dump_macros == dump_names
  775.                 || dump_macros == dump_definitions)))) {
  776. ***************
  777. *** 4358,4361 ****
  778. --- 4426,4437 ----
  779.           }
  780.   #endif
  781. + #ifdef VOL_SEPARATOR
  782. +         if (ep == NULL) ep = rindex (nam, VOL_SEPARATOR);
  783. +         else {
  784. +           char *tmp = rindex (nam, VOL_SEPARATOR);
  785. +           if (tmp != NULL && tmp > ep) ep = tmp;
  786. +         }
  787. +         if (ep != NULL && *ep == VOL_SEPARATOR) ep++;
  788. + #endif
  789.   #else                /* VMS */
  790.           ep = rindex (nam, ']');
  791. ***************
  792. *** 4484,4487 ****
  793. --- 4560,4566 ----
  794.     /* If specified file name is absolute, just open it.  */
  795.   
  796. + #ifdef __amigados__
  797. +   if (amigados_abs_filename (fbeg, flen)) {
  798. + #else
  799.     if (*fbeg == '/'
  800.   #ifdef DIR_SEPARATOR
  801. ***************
  802. *** 4489,4492 ****
  803. --- 4568,4572 ----
  804.   #endif
  805.         ) {
  806. + #endif
  807.       strncpy (fname, (char *) fbeg, flen);
  808.       fname[flen] = 0;
  809. ***************
  810. *** 4511,4514 ****
  811. --- 4591,4597 ----
  812.         continue;
  813.       strcpy (fname, searchptr->fname);
  814. + #ifdef __amigados__
  815. +     if (fname[strlen (fname) - 1] != ':')
  816. + #endif
  817.       strcat (fname, "/");
  818.       fname[strlen (fname) + flen] = 0;
  819. ***************
  820. *** 9925,9928 ****
  821. --- 10008,10016 ----
  822.     va_list args;
  823.   
  824. + /* PhB 25-Jun-95: restore old process priority before exiting */
  825. + #ifdef __amigados__
  826. +   SetTaskPri(amiga_task, amiga_old_priority);
  827. + #endif /* __amigados__ */
  828.     fprintf (stderr, "%s: ", progname);
  829.     VA_START (args, msg);
  830. ***************
  831. *** 10421,10422 ****
  832. --- 10509,10534 ----
  833.   }
  834.   #endif /* VMS */
  835. + #ifdef __amigados__
  836. + /* This function returns whether the LEN characters long filename FNAME 
  837. +    is an absolute path specification. */
  838. + static int
  839. + amigados_abs_filename (fname, len)
  840. +      char *fname;
  841. +      int len;
  842. + {
  843. +   /* we're using ixemul.library, which treats `/foo' as `foo:', so 
  844. +      fname[0] is to be considered absolute as well */
  845. +   if (fname[0] == '/')
  846. +     return 1;
  847. +   /* else do an index() on fname, but one which is limited to len characters */
  848. +   while (*fname && *fname != ':' && len) 
  849. +     fname++, len--;
  850. +   return *fname == ':';
  851. + }
  852. + #endif /* __amigados__ */
  853. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/amigados.c gcc-2.7.0-amiga/config/m68k/amigados.c
  854. *** /usr/goinfre/gcc-2.7.0/config/m68k/amigados.c
  855. --- gcc-2.7.0-amiga/config/m68k/amigados.c    Fri Jun 23 11:52:18 1995
  856. ***************
  857. *** 0 ****
  858. --- 1,205 ----
  859. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  860. +    Copyright (C) 1992 Free Software Foundation, Inc.
  861. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  862. + This file is part of GNU CC.
  863. + GNU CC is free software; you can redistribute it and/or modify
  864. + it under the terms of the GNU General Public License as published by
  865. + the Free Software Foundation; either version 2, or (at your option)
  866. + any later version.
  867. + GNU CC is distributed in the hope that it will be useful,
  868. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  869. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  870. + GNU General Public License for more details.
  871. + You should have received a copy of the GNU General Public License
  872. + along with GNU CC; see the file COPYING.  If not, write to
  873. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  874. + #include "m68k/m68k.c"
  875. + /* Does operand (which is a symbolic_operand) live in text space? If
  876. +    so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.
  877. +    This function is used in base relative code generation. */
  878. + int
  879. + read_only_operand (operand)
  880. +      rtx operand;
  881. + {
  882. +   if (GET_CODE (operand) == CONST)
  883. +     operand = XEXP (XEXP (operand, 0), 0);
  884. +   if (GET_CODE (operand) == SYMBOL_REF)
  885. +     return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
  886. +   return 1;
  887. + }
  888. + /* the rest of the file is to implement AmigaDOS specific keywords some day.
  889. +    The approach used so far used __attribute__ for this, but this required
  890. +    changes to c-parse.y as well as if we'd use the common keywords used
  891. +    on commercial AmigaDOS C-compilers as well. So in the future I'll probably
  892. +    switch to __saveds and __interrupt keywords as well.
  893. +    The rest of this file is currently ignored, because it's no longer
  894. +    working with the current gcc version. */
  895. + #if not_yet_working
  896. + #include "tree.h"
  897. + struct attribute {
  898. +   tree ident;
  899. +   int  saveds : 1,
  900. +        interrupt : 1;
  901. + };
  902. + static struct attribute *a_tab = 0;
  903. + static int a_index, a_size;
  904. + void
  905. + add_attr_entry (attr)
  906. +     struct attribute *attr;
  907. + {
  908. +   if (! a_tab)
  909. +     {
  910. +       a_size = 10;
  911. +       a_index = 0;
  912. +       a_tab  = (struct attribute *) xmalloc (a_size * sizeof (struct attribute));
  913. +     }
  914. +   if (a_index == a_size)
  915. +     {
  916. +       a_size <<= 1;
  917. +       a_tab = (struct attribute *) xrealloc (a_tab, a_size * sizeof (struct attribute));
  918. +     }
  919. +   a_tab[a_index++] = *attr;
  920. + }
  921. + void
  922. + attr_do_saveds (function_ident)
  923. +       tree function_ident;
  924. + {
  925. +   struct attribute attr, *a;
  926. +   int i;
  927. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  928. +     if (a->ident == function_ident)
  929. +       {
  930. +     a->saveds = 1;
  931. +     return;
  932. +       }
  933. +   /* create a new entry for this function */
  934. +   attr.ident     = function_ident;
  935. +   attr.saveds    = 1;
  936. +   attr.interrupt = 0;
  937. +   add_attr_entry (&attr);
  938. + }
  939. + void
  940. + attr_do_interrupt (function_ident)
  941. +     tree function_ident;
  942. + {
  943. +   struct attribute attr, *a;
  944. +   int i;
  945. +   for (i = 0, a = a_tab; i < a_index; i++, a++)
  946. +     if (a->ident == function_ident)
  947. +       {
  948. +     /* __interrupt implies __saveds */
  949. +     a->saveds    = 1;
  950. +     a->interrupt = 1;
  951. +     return;
  952. +       }
  953. +   /* create a new entry for this function */
  954. +   attr.ident     = function_ident;
  955. +   attr.saveds     = 1;
  956. +   attr.interrupt = 1;
  957. +   add_attr_entry (&attr);
  958. + }
  959. + int
  960. + attr_does_saveds (function_name)
  961. +     char *function_name;
  962. + {
  963. +   tree ident = get_identifier (function_name);
  964. +   struct attribute *attr;
  965. +   int i;
  966. +   
  967. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  968. +     if (attr->ident == ident)
  969. +       return attr->saveds;
  970. +   return 0;
  971. + }
  972. + int
  973. + attr_does_interrupt (function_name)
  974. +     char *function_name;
  975. + {
  976. +   tree ident = get_identifier (function_name);
  977. +   struct attribute *attr;
  978. +   int i;
  979. +   
  980. +   for (i = 0, attr = a_tab; i < a_index; i++, attr++)
  981. +     if (attr->ident == ident)
  982. +       return attr->interrupt;
  983. +   return 0;
  984. + }
  985. + #endif
  986. + /*
  987. + Stack checking and auto-extend
  988. + This is my first attempt to implement stack extension with gcc.
  989. + If you think some things should be changed please write
  990. + to me immediately (fleischr@izfm.uni-stuttgart.de, or even better
  991. + to amiga-gcc-port@lists.funet.fi for discussion).
  992. + If you don't want to recompile gcc (to check it out) you can still
  993. + test the example supported (bigtest.c) or read the documentation.
  994. + Simply do a 'make' to build it.
  995. + Matthias
  996. + */
  997. + rtx gen_stack_management_call (stack_pointer, arg, func)
  998. +      rtx stack_pointer; /* rtx to put the result into       */
  999. +      rtx arg;           /* The argument to put into d0      */
  1000. +      char *func;        /* The name of the function to call */
  1001. + {
  1002. +   rtx fcall, assem;
  1003. +   emit_move_insn (gen_rtx (REG, SImode, 0), arg); /* Move arg to d0 */
  1004. +   assem = gen_rtx (ASM_OPERANDS, VOIDmode, func, "=r", 0,
  1005. +                    rtvec_alloc(1), rtvec_alloc(1), "internal", 0);
  1006. +   XVECEXP (assem, 3, 0) = gen_rtx (REG, SImode, 0);
  1007. +   XVECEXP (assem, 4, 0) = gen_rtx (ASM_INPUT, SImode, "r");
  1008. +   fcall = gen_rtx (PARALLEL, VOIDmode, rtvec_alloc(1+4));
  1009. +   XVECEXP (fcall, 0, 0)
  1010. +     = gen_rtx (SET, VOIDmode, stack_pointer, assem);
  1011. +   XVECEXP (fcall, 0, 1)
  1012. +     = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 9));
  1013. +   XVECEXP (fcall, 0, 2)
  1014. +     = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 8));
  1015. +   XVECEXP (fcall, 0, 3)
  1016. +     = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 1));
  1017. +   XVECEXP (fcall, 0, 4)
  1018. +     = gen_rtx (CLOBBER, VOIDmode, gen_rtx (REG, QImode, 0));  
  1019. +   return fcall; /* call function sp=func(d0) */
  1020. + }
  1021. + rtx gen_stack_cleanup_call (stack_pointer,sa)
  1022. +      rtx stack_pointer;
  1023. +      rtx sa;
  1024. + {
  1025. +   return gen_stack_management_call (stack_pointer, sa, "jbsr ___move_d0_sp");
  1026. + }
  1027. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/amigados.h gcc-2.7.0-amiga/config/m68k/amigados.h
  1028. *** /usr/goinfre/gcc-2.7.0/config/m68k/amigados.h
  1029. --- gcc-2.7.0-amiga/config/m68k/amigados.h    Sun Aug  6 21:30:47 1995
  1030. ***************
  1031. *** 0 ****
  1032. --- 1,453 ----
  1033. + /* Definitions of target machine for GNU compiler.  amiga 68000/68020 version.
  1034. +    Copyright (C) 1992 Free Software Foundation, Inc.
  1035. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  1036. + This file is part of GNU CC.
  1037. + GNU CC is free software; you can redistribute it and/or modify
  1038. + it under the terms of the GNU General Public License as published by
  1039. + the Free Software Foundation; either version 2, or (at your option)
  1040. + any later version.
  1041. + GNU CC is distributed in the hope that it will be useful,
  1042. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  1043. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  1044. + GNU General Public License for more details.
  1045. + You should have received a copy of the GNU General Public License
  1046. + along with GNU CC; see the file COPYING.  If not, write to
  1047. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  1048. + /* Phil.B 12-Mar-95: Define USE_GAS if GCC is supposed to work with the GNU
  1049. +    assembler, GNU linker and GNU debugger using DBX debugging information. */
  1050. + #define USE_GAS
  1051. + /* Control assembler-syntax conditionals in m68k.md.  */
  1052. + #ifndef USE_GAS
  1053. + #define MOTOROLA        /* Use Motorola syntax rather than "MIT" */
  1054. + #endif /* !USE_GAS */
  1055. + #include "m68k/m68k.h"
  1056. + /* See m68k.h for bits in TARGET_DEFAULT.
  1057. +    0 means 68000, no hardware fpu (68881/68882/68040).
  1058. +    7 means 68020 (or higher) with hardware fpu.  */
  1059. + #ifndef TARGET_DEFAULT
  1060. + #define TARGET_DEFAULT 0
  1061. + #endif
  1062. + /* Define __HAVE_68881__ in preprocessor according to the -m flags.
  1063. +    This will control the use of inline 68881 insns in certain macros.
  1064. +    Also inform the program which CPU this is for.  */
  1065. + #if TARGET_DEFAULT & 02
  1066. + /* -m68881 is the default */
  1067. + #define CPP_SPEC \
  1068. + "%{!msoft-float:-D__HAVE_68881__ }\
  1069. + %{!ansi:%{m68000:-Dmc68010}%{mc68000:-Dmc68010}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
  1070. + %{mc68040:-Dmc68040}%{!mc68000:%{!m68000:-Dmc68020}}}"
  1071. + #else
  1072. + /* -msoft-float is the default, assume -mc68000 as well */
  1073. + #define CPP_SPEC \
  1074. + "%{m68881:-D__HAVE_68881__ }\
  1075. + %{!ansi:%{m68020:-Dmc68020}%{mc68020:-Dmc68020}%{m68030:-Dmc68030}%{mc68030:-Dmc68030}%{m68040:-Dmc68040}\
  1076. + %{mc68040:-Dmc68040}%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:-Dmc68010}}}}}}}"
  1077. + /* Don't try using XFmode since we don't have appropriate runtime software
  1078. +    support.  */
  1079. + #undef LONG_DOUBLE_TYPE_SIZE
  1080. + #define LONG_DOUBLE_TYPE_SIZE 64
  1081. + #endif
  1082. + /* -m68000 requires special flags to the assembler.  */
  1083. + #define ASM_SPEC \
  1084. +  "%{m68000:-mc68010} %{mc68000:-mc68010} %{m68020:-mc68020} %{mc68020:-mc68020} %{m68030:-mc68030} %{mc68030:-mc68030} \
  1085. + %{m68040:-mc68040} %{mc68040:-mc68040} %{m68020-40:-mc68020} %{mc68020-40:-mc68020} \
  1086. + %{!mc68000:%{!m68000:%{!mc68020:%{!m68020:%{!mc68030:%{!m68030:%{!mc68040:%{!m68040:%{!m68020-40:%{!mc68020-40:-mc68010}}}}}}}}}} %{msmall-code:-l}"
  1087. + /* amiga/amigados are the new "standard" defines for the Amiga, MCH_AMIGA
  1088. +  * was used before and is included for compatibility reasons */
  1089. + #define CPP_PREDEFINES "-Dmc68000 -Damiga -Damigados -DMCH_AMIGA -DAMIGA -Asystem(amigados) -Acpu(m68k) -Amachine(m68k)"
  1090. + /* Choose the right startup file, depending on whether we use base relative
  1091. +    code, base relative code with automatic relocation (-resident), or plain
  1092. +    crt0.o. 
  1093. +   
  1094. +    Profiling is currently only available for plain startup.
  1095. +    mcrt0.o does not (yet) exist. */
  1096. + #define STARTFILE_SPEC \
  1097. +  "%{!noixemul:%{resident:rcrt0.o%s}%{!resident:%{!fbaserel:%{pg:gcrt0.o%s}%{!pg:%{p:mcrt0.o%s}%{!p:crt0.o%s}}}\
  1098. + %{fbaserel:%{pg:bgcrt0.o%s}%{!pg:%{p:bmcrt0.o%s}%{!p:bcrt0.o%s}}}}}\
  1099. + %{noixemul:%{resident:libnix/nrcrt0.o%s}%{!resident:%{fbaserel:libnix/nbcrt0.o%s}%{!fbaserel:libnix/ncrt0.o%s}}}"
  1100. + #define ENDFILE_SPEC "%{noixemul:-lstubs}"
  1101. + /* Automatically search libamiga.a for AmigaDOS specific functions.  Note
  1102. +    that we first search the standard C library to resolve as much as
  1103. +    possible from there, since it has names that are duplicated in libamiga.a
  1104. +    which we *don't* want from there.  Then search the standard C library
  1105. +    again to resolve any references that libamiga.a might have generated.
  1106. +    This may only be a temporary solution since it might be better to simply
  1107. +    remove the things from libamiga.a that should be pulled in from libc.a
  1108. +    instead, which would eliminate the first reference to libc.a. */
  1109. + #define LIB_SPEC "%{!noixemul:%{!p:%{!pg:-lc -lamiga -lc}}%{p:-lc_p}%{pg:-lc_p}}%{noixemul:-lnixmain -lnix -lamiga}"
  1110. + /* if debugging, tell the linker to output amiga-hunk symbols *and* a BSD
  1111. +    compatible debug hunk (which will probably change in the future, it's not
  1112. +    tremendously useful in its current state). */
  1113. + #define LINK_SPEC "%{noixemul:-shortdata -fl libnix} %{fbaserel:%{!resident:-databss-together -fl libb}}\
  1114. + %{resident:-databss-together -datadata-reloc -fl libb} %{g:-amiga-debug-hunk} \
  1115. + %{m68020:-fl libm020} %{m68030:-fl libm020} %{m68040:-fl libm020} %{m68020-40:-fl libm020} %{m68881:-fl libm881}\
  1116. + %{mc68020:-fl libm020} %{mc68030:-fl libm020} %{mc68040:-fl libm020} %{mc68020-40:-fl libm020} %{mc68881:-fl libm881}"
  1117. + #define CC1_SPEC "%{m68040:-mbitfield }%{mc68040:-mbitfield }%{resident:-fbaserel }%{msmall-code:-fno-function-cse }%{!noixemul:-mfixedstack} "
  1118. + #define CC1PLUS_SPEC "%{m68040:-mbitfield }%{mc68040:-mbitfield }%{resident:-fbaserel }%{msmall-code:-fno-function-cse }%{!noixemul:-mfixedstack} "
  1119. + /* Omit frame pointer at high optimization levels. (This doesn't hurt, since
  1120. +    GDB doesn't work under AmigaDOS at the moment anyway..) */
  1121. +   
  1122. + #define OPTIMIZATION_OPTIONS(OPTIMIZE) \
  1123. + {                                  \
  1124. +   if (OPTIMIZE >= 2)                         \
  1125. +     flag_omit_frame_pointer = 1;                \
  1126. + }
  1127. + /* provide a dummy entry for the small-code switch. This is currently only
  1128. +    needed by the assembler (explanations: m68k.h), but will be used by cc1
  1129. +    to output 16bit pc-relative code later.
  1130. +    PhB 21-Jun-95: use now SUBTARGET_SWITCHES instead of redefining
  1131. +    whole TARGET_SWITCHES, means that all additions made to m68k.* are
  1132. +    now taken into account */
  1133. + #undef SUBTARGET_SWITCHES
  1134. + #define SUBTARGET_SWITCHES  \
  1135. +     { "small-code", 0 },/* Affects *_SPEC and/or GAS.  */    \
  1136. +     { "stackcheck", 02000},            \
  1137. +     { "nostackcheck", -02000},            \
  1138. +     { "stackextend", 04000},            \
  1139. +     { "nostackextend", -04000},            \
  1140. +     { "fixedstack", -04200},
  1141. + #define TARGET_STACKCHECK    (target_flags&02000)
  1142. + #define TARGET_STACKEXTEND    (!TARGET_STACKCHECK&&(target_flags&04000))
  1143. + /* Every structure or union's size must be a multiple of 2 bytes.  */
  1144. + #define STRUCTURE_SIZE_BOUNDARY 16
  1145. + /* This is (almost;-)) BSD, so it wants DBX format.  */
  1146. + #define DBX_DEBUGGING_INFO
  1147. + /* Allow folding division by zero.  */
  1148. + #define REAL_INFINITY
  1149. + /* The following was hacked into final.c, to allow some notice of
  1150. +  * source line and filename to be injected into the assembly code,
  1151. +  * even if not using one of the "approved" debuggers (albaugh@agames.com).
  1152. +  */
  1153. + #if 0
  1154. + #define ASM_NOTE_SOURCE_LINE(FILE, LINE, FILENAME)\
  1155. +   fprintf(file,"*#line %d \"%s\"\n",(LINE),(FILENAME))
  1156. + #endif
  1157. + #if 0    /* This apparently is no longer necessary? */
  1158. + /* This is how to output an assembler line defining a `double' constant.  */
  1159. + #undef ASM_OUTPUT_DOUBLE
  1160. + #define ASM_OUTPUT_DOUBLE(FILE,VALUE)                    \
  1161. +   {                                    \
  1162. +     if (REAL_VALUE_ISINF (VALUE))                    \
  1163. +       fprintf (FILE, "\t.double 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  1164. +     else if (isnan (VALUE))                        \
  1165. +       {                                    \
  1166. +     union { double d; long l[2];} t;                \
  1167. +     t.d = (VALUE);                            \
  1168. +     fprintf (FILE, "\t.long 0x%lx\n\t.long 0x%lx\n", t.l[0], t.l[1]); \
  1169. +       }                                    \
  1170. +     else                                \
  1171. +       fprintf (FILE, "\t.double 0r%.17g\n", VALUE);            \
  1172. +   }
  1173. + /* This is how to output an assembler line defining a `float' constant.  */
  1174. + #undef ASM_OUTPUT_FLOAT
  1175. + #define ASM_OUTPUT_FLOAT(FILE,VALUE)                    \
  1176. +   {                                    \
  1177. +     if (REAL_VALUE_ISINF (VALUE))                    \
  1178. +       fprintf (FILE, "\t.single 0r%s99e999\n", (VALUE) > 0 ? "" : "-");    \
  1179. +     else if (isnan (VALUE))                        \
  1180. +       {                                    \
  1181. +     union { float f; long l;} t;                    \
  1182. +     t.f = (VALUE);                            \
  1183. +     fprintf (FILE, "\t.long 0x%lx\n", t.l);                \
  1184. +       }                                    \
  1185. +     else                                \
  1186. +       fprintf (FILE, "\t.single 0r%.9g\n", VALUE);            \
  1187. +   }
  1188. + /* This is how to output an assembler lines defining floating operands.
  1189. +    There's no way to output a NaN's fraction, so we lose it.  */
  1190. +   
  1191. + #undef ASM_OUTPUT_FLOAT_OPERAND
  1192. + #define ASM_OUTPUT_FLOAT_OPERAND(CODE,FILE,VALUE)                \
  1193. +  do {                                \
  1194. +       if (CODE == 'f')                        \
  1195. +         {                            \
  1196. +           (REAL_VALUE_ISINF ((VALUE))                        \
  1197. +            ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  1198. +            : (VALUE) == -0.0                            \
  1199. +            ? asm_fprintf (FILE, "%I0r-0.0")                    \
  1200. +            : asm_fprintf (FILE, "%I0r%.9g", (VALUE))) \
  1201. +         } else {                                        \
  1202. +           long l;                        \
  1203. +           REAL_VALUE_TO_TARGET_SINGLE (VALUE, l);        \
  1204. +           if (sizeof (int) == sizeof (long))            \
  1205. +             asm_fprintf ((FILE), "%I0x%x", l);            \
  1206. +           else                            \
  1207. +             asm_fprintf ((FILE), "%I0x%lx", l);            \
  1208. +         }                            \
  1209. +      } while (0)
  1210. + #undef ASM_OUTPUT_DOUBLE_OPERAND
  1211. + #define ASM_OUTPUT_DOUBLE_OPERAND(FILE,VALUE)                \
  1212. +   (REAL_VALUE_ISINF ((VALUE))                        \
  1213. +    ? asm_fprintf (FILE, "%I0r%s99e999", ((VALUE) > 0 ? "" : "-")) \
  1214. +    : (VALUE) == -0.0                            \
  1215. +    ? asm_fprintf (FILE, "%I0r-0.0")                    \
  1216. +    : asm_fprintf (FILE, "%I0r%.17g", (VALUE)))
  1217. + #endif    /* 0 */
  1218. + /* use A5 as framepointer instead of A6, this makes A6 available as a
  1219. +    general purpose register, and can thus be used without problems in
  1220. +    direct library calls. */
  1221. + #undef FRAME_POINTER_REGNUM
  1222. + #define FRAME_POINTER_REGNUM 13
  1223. + #undef ARG_POINTER_REGNUM
  1224. + #define ARG_POINTER_REGNUM 13
  1225. + /* we use A4 for this, not A5, which is the framepointer */
  1226. + #undef PIC_OFFSET_TABLE_REGNUM
  1227. + #define PIC_OFFSET_TABLE_REGNUM 12
  1228. + /* setup a default shell return value for those (gazillion..) programs that
  1229. +    (inspite of ANSI-C) declare main() to be void (or even VOID...) and thus
  1230. +    cause the shell to randomly caugh upon executing such programs (contrary
  1231. +    to Unix, AmigaDOS scripts are terminated with an error if a program returns
  1232. +    with an error code above the `error' or even `failure' level
  1233. +    (which is configurable with the FAILAT command) */
  1234. + #define DEFAULT_MAIN_RETURN c_expand_return (integer_zero_node)
  1235. + /* we do have an ansi-compliant c-library ;-) */
  1236. + #define HAVE_VPRINTF
  1237. + #define HAVE_VFPRINTF
  1238. + #define HAVE_PUTENV
  1239. + #define HAVE_STRERROR
  1240. + #define HAVE_ATEXIT
  1241. + /* given that symbolic_operand(X), return TRUE if no special
  1242. +    base relative relocation is necessary */
  1243. + #define LEGITIMATE_BASEREL_OPERAND_P(X) \
  1244. +   (flag_pic >= 3 && read_only_operand (X))
  1245. + #undef LEGITIMATE_PIC_OPERAND_P
  1246. + #define LEGITIMATE_PIC_OPERAND_P(X) \
  1247. +   (! symbolic_operand (X, VOIDmode) || LEGITIMATE_BASEREL_OPERAND_P (X))
  1248. + /* Phil.B 12-Mar-95: check if this would fix some PIC problems */
  1249. + /* In m68k svr4, a symbol_ref rtx can be a valid PIC operand if it is an
  1250. +    operand of a function call. */
  1251. + /* #undef LEGITIMATE_PIC_OPERAND_P
  1252. + #define LEGITIMATE_PIC_OPERAND_P(X) \
  1253. +   (! symbolic_operand (X, VOIDmode) \
  1254. +    || ((GET_CODE(X) == SYMBOL_REF) && SYMBOL_REF_FLAG(X)))
  1255. + */
  1256. + /* Define this macro if references to a symbol must be treated
  1257. +    differently depending on something about the variable or
  1258. +    function named by the symbol (such as what section it is in).
  1259. +    The macro definition, if any, is executed immediately after the
  1260. +    rtl for DECL or other node is created.
  1261. +    The value of the rtl will be a `mem' whose address is a
  1262. +    `symbol_ref'.
  1263. +    The usual thing for this macro to do is to a flag in the
  1264. +    `symbol_ref' (such as `SYMBOL_REF_FLAG') or to store a modified
  1265. +    name string in the `symbol_ref' (if one bit is not enough
  1266. +    information).
  1267. +    On the Amiga we use this to indicate if a symbol is in text or
  1268. +    data space.  */
  1269. + #define ENCODE_SECTION_INFO(DECL)                    \
  1270. + do                                    \
  1271. +   {                                    \
  1272. +     if (TREE_CODE (DECL) == FUNCTION_DECL)                \
  1273. +       SYMBOL_REF_FLAG (XEXP (DECL_RTL (DECL), 0)) = 1;            \
  1274. +     else                                \
  1275. +       {                                    \
  1276. +     rtx rtl = (TREE_CODE_CLASS (TREE_CODE (DECL)) != 'd'        \
  1277. +            ? TREE_CST_RTL (DECL) : DECL_RTL (DECL));        \
  1278. +     if (flag_pic >= 3 &&                         \
  1279. +         (TREE_CODE (DECL) == STRING_CST && !flag_writable_strings))    \
  1280. +       SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;                \
  1281. +     else if (flag_pic < 3 &&                    \
  1282. +          RTX_UNCHANGING_P (rtl) && !MEM_VOLATILE_P (rtl))    \
  1283. +       SYMBOL_REF_FLAG (XEXP (rtl, 0)) = 1;                \
  1284. +       }                                    \
  1285. +   }                                    \
  1286. + while (0)
  1287. + #undef SELECT_RTX_SECTION
  1288. + #define SELECT_RTX_SECTION(MODE, X) readonly_data_section ();
  1289. + /* according to varasm.c, RELOC referrs *only* to whether constants (!)
  1290. +    are addressed by address. This doesn't matter in baserelative code,
  1291. +    so we allow (inspite of flag_pic) readonly_data_section() in that
  1292. +    case */
  1293. + #undef SELECT_SECTION
  1294. + #define SELECT_SECTION(DECL, RELOC)                    \
  1295. + {                                    \
  1296. +       if ((TREE_CODE (DECL) == STRING_CST) && !flag_writable_strings)    \
  1297. +     readonly_data_section ();                    \
  1298. +       else if (flag_pic < 3                        \
  1299. +       && TREE_READONLY (DECL)                    \
  1300. +       && ! TREE_THIS_VOLATILE (DECL)                \
  1301. +       && DECL_INITIAL (DECL)                    \
  1302. +       && (DECL_INITIAL (DECL) == error_mark_node            \
  1303. +           || TREE_CONSTANT (DECL_INITIAL (DECL)))            \
  1304. +       && ! (flag_pic && RELOC))                    \
  1305. +     readonly_data_section ();                    \
  1306. +       else                                \
  1307. +     data_section ();                        \
  1308. + }
  1309. + #if not_yet_working
  1310. + /* starting support for amiga specific keywords
  1311. +  * --------------------------------------------
  1312. +  */
  1313. + /* validate attributes that don't take a parameter. Currently we support
  1314. +  * __attribute__ (saveds) and __attribute__ (interrupt)
  1315. +  */
  1316. + #define HANDLE_ATTRIBUTE0(attr) \
  1317. +   (strcmp(attr, "saveds") != 0 && strcmp(attr, "interrupt") != 0)
  1318. + /* (c-common.c)
  1319. +  * install additional attributes
  1320. +  */
  1321. + #define HANDLE_EXTRA_ATTRIBUTES(a)                         \
  1322. +   if (TREE_VALUE (a) != 0                            \
  1323. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  1324. +       && TREE_VALUE (a) == get_identifier ("saveds"))                \
  1325. +     {                                        \
  1326. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  1327. +         {                                    \
  1328. +           warning_with_decl (decl,                        \
  1329. +               "saveds attribute specified for non-function `%s'");        \
  1330. +       return;                                \
  1331. +         }                                    \
  1332. +                                               \
  1333. +       attr_do_saveds (DECL_NAME (decl));                    \
  1334. +     }                                        \
  1335. +   else if (TREE_VALUE (a) != 0                            \
  1336. +       && TREE_CODE (TREE_VALUE (a)) == IDENTIFIER_NODE                \
  1337. +       && TREE_VALUE (a) == get_identifier ("interrupt"))            \
  1338. +     {                                        \
  1339. +       if (TREE_CODE (decl) != FUNCTION_DECL)                    \
  1340. +         {                                    \
  1341. +           warning_with_decl (decl,                        \
  1342. +               "saveds attribute specified for non-function `%s'");        \
  1343. +       return;                                \
  1344. +         }                                    \
  1345. +                                               \
  1346. +       attr_do_interrupt (DECL_NAME (decl));                    \
  1347. +     }                                        \
  1348. + #define PROLOGUE_EXTRA_SAVE(mask)                        \
  1349. +   { extern char *current_function_name;                        \
  1350. +     /* saveds makes the function preserve d1/a0/a1 as well */            \
  1351. +     if (attr_does_saveds (current_function_name))                \
  1352. +       mask |= 0x40c0; }                                \
  1353. + #define EPILOGUE_EXTRA_RESTORE(mask, nregs)                    \
  1354. +   { extern char *current_function_name;                        \
  1355. +     /* restore those extra registers */                        \
  1356. +     if (attr_does_saveds (current_function_name))                \
  1357. +       {                                        \
  1358. +     mask |= 0x0302;                                \
  1359. +     nregs += 3;                                \
  1360. +       } }                                    \
  1361. + #define EPILOGUE_EXTRA_BARRIER_KLUDGE(stream)                    \
  1362. +   { extern char *current_function_name;                        \
  1363. +     /* PLEASE Help! how is this done cleaner?? */                \
  1364. +     if (attr_does_saveds (current_function_name))                \
  1365. +       {                                        \
  1366. +     fprintf (stderr,                             \
  1367. +          "warning: couldn't cleanup `saveds'-stack in `%s'.\n");    \
  1368. +     fprintf (stderr,                            \
  1369. +          "         this is only ok, if the function never returns!\n");    \
  1370. +       }    }                                    \
  1371. +         
  1372. + #define EPILOGUE_EXTRA_TEST(stream)                        \
  1373. +   { extern char *current_function_name;                        \
  1374. +     /* with the interrupt-attribute, we have to set the cc before rts */    \
  1375. +     if (attr_does_interrupt (current_function_name))                \
  1376. +       asm_fprintf (stream, "\ttstl %s\n", reg_names[0]); }            \
  1377. + #endif
  1378. + /*
  1379. +  * Support for automatic stack extension.
  1380. +  */
  1381. + #define HAVE_restore_stack_nonlocal 1
  1382. + #define gen_restore_stack_nonlocal \
  1383. + (TARGET_STACKEXTEND?gen_stack_cleanup_call:gen_move_insn)
  1384. + #define HAVE_restore_stack_function 1
  1385. + #define gen_restore_stack_function gen_restore_stack_nonlocal
  1386. + #define HAVE_restore_stack_block 1
  1387. + #define gen_restore_stack_block gen_restore_stack_nonlocal
  1388. + /* Reserve PIC_OFFSET_TABLE_REGNUM (a5) for doing PIC relocation if position
  1389. +    independent code is being generated, by making it a fixed register. */
  1390. + #define CONDITIONAL_REGISTER_USAGE            \
  1391. + {                            \
  1392. +   if (flag_pic)                        \
  1393. +     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;        \
  1394. +   /* prevent saving/restoring of the base reg */    \
  1395. +   if (flag_pic == 3)                    \
  1396. +     call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;    \
  1397. + }
  1398. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/m68k.c gcc-2.7.0-amiga/config/m68k/m68k.c
  1399. *** /usr/goinfre/gcc-2.7.0/config/m68k/m68k.c    Thu Jun 15 20:12:45 1995
  1400. --- gcc-2.7.0-amiga/config/m68k/m68k.c    Fri Jun 23 11:52:19 1995
  1401. ***************
  1402. *** 63,70 ****
  1403.   finalize_pic ()
  1404.   {
  1405. !   if (flag_pic && current_function_uses_pic_offset_table)
  1406.       {
  1407.         rtx insn = gen_rtx (USE, VOIDmode, pic_offset_table_rtx);
  1408.         emit_insn_after (insn, get_insns ());
  1409.         emit_insn (insn);
  1410.       }
  1411. --- 63,72 ----
  1412.   finalize_pic ()
  1413.   {
  1414. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1415.       {
  1416.         rtx insn = gen_rtx (USE, VOIDmode, pic_offset_table_rtx);
  1417. + #ifndef __amigados__
  1418.         emit_insn_after (insn, get_insns ());
  1419. + #endif
  1420.         emit_insn (insn);
  1421.       }
  1422. ***************
  1423. *** 95,102 ****
  1424.     extern char call_used_regs[];
  1425.     int fsize = (size + 3) & -4;
  1426. !   
  1427.   
  1428.     if (frame_pointer_needed)
  1429.       {
  1430.         if (fsize == 0 && TARGET_68040)
  1431.       {
  1432. --- 97,134 ----
  1433.     extern char call_used_regs[];
  1434.     int fsize = (size + 3) & -4;
  1435.   
  1436. + /* Matthias Fleischer stack-checking and auto-extend for the Amiga */  
  1437. + #ifndef MOTOROLA
  1438. +   if (TARGET_STACKCHECK)
  1439. +     {
  1440. +       if (fsize<256)
  1441. +         asm_fprintf (stream, "\tjbsr ___stkchk_0\n");
  1442. +       else if(fsize<0x8000)
  1443. +         asm_fprintf (stream, "\tmovel #%d:W,d0\n\tjbsr ___stkchk_d0\n",
  1444. +                  fsize, reg_names[FRAME_POINTER_REGNUM]);
  1445. +       else
  1446. +         asm_fprintf (stream, "\tmovel #%d,d0\n\tjbsr ___stkchk_d0\n",
  1447. +                  fsize, reg_names[FRAME_POINTER_REGNUM]);
  1448. +     }
  1449. + #endif
  1450.     if (frame_pointer_needed)
  1451.       {
  1452. + /* Matthias Fleischer stack-checking and auto-extend for the Amiga */  
  1453. + #ifndef MOTOROLA
  1454. +       if (TARGET_STACKEXTEND)
  1455. +         {
  1456. +           if (!fsize)
  1457. +         asm_fprintf (stream, "\tjbsr ___link_%s_0_f\n",
  1458. +                      reg_names[FRAME_POINTER_REGNUM]);
  1459. +       else if(fsize<0x8000)
  1460. +          asm_fprintf (stream, "\tmovel #%d:W,d0\n\tjbsr ___link_%s_d0_f\n",
  1461. +                    fsize, reg_names[FRAME_POINTER_REGNUM]);
  1462. +           else
  1463. +          asm_fprintf (stream, "\tmovel #%d,d0\n\tjbsr ___link_%s_d0_f\n",
  1464. +                    fsize, reg_names[FRAME_POINTER_REGNUM]);
  1465. +     }
  1466. +       else
  1467. + #endif
  1468.         if (fsize == 0 && TARGET_68040)
  1469.       {
  1470. ***************
  1471. *** 144,147 ****
  1472. --- 176,193 ----
  1473.       }
  1474.       }
  1475. + /* Matthias Fleischer stack-checking and auto-extend for the Amiga */  
  1476. + #ifndef MOTOROLA
  1477. +   else if (TARGET_STACKEXTEND)
  1478. +     {
  1479. +       if (!fsize)
  1480. +         asm_fprintf (stream, "\tjbsr ___sub_0_sp_f\n");
  1481. +       else if (fsize+4<0x8000)
  1482. +     asm_fprintf (stream, "\tmovel #%d:W,d0\n\tjbsr ___sub_d0_sp_f\n",
  1483. +                fsize + 4, reg_names[FRAME_POINTER_REGNUM]);
  1484. +       else
  1485. +     asm_fprintf (stream, "\tmovel %0I%d,d0\n\tjbsr ___sub_d0_sp_f\n",
  1486. +                fsize + 4, reg_names[FRAME_POINTER_REGNUM]);
  1487. +     }
  1488. + #endif
  1489.     else if (fsize)
  1490.       {
  1491. ***************
  1492. *** 202,205 ****
  1493. --- 248,254 ----
  1494.         num_saved_regs--;
  1495.       }
  1496. + #ifdef PROLOGUE_EXTRA_SAVE
  1497. +   PROLOGUE_EXTRA_SAVE (mask);
  1498. + #endif
  1499.   
  1500.   #if NEED_PROBE
  1501. ***************
  1502. *** 235,239 ****
  1503.   #endif
  1504.       }
  1505. !   if (flag_pic && current_function_uses_pic_offset_table)
  1506.       {
  1507.   #ifdef MOTOROLA
  1508. --- 284,288 ----
  1509.   #endif
  1510.       }
  1511. !   if (flag_pic && (flag_pic < 3) && current_function_uses_pic_offset_table)
  1512.       {
  1513.   #ifdef MOTOROLA
  1514. ***************
  1515. *** 300,303 ****
  1516. --- 349,355 ----
  1517.        about which function the pc is in at this address.  */
  1518.         asm_fprintf (stream, "\tnop\n");
  1519. + #ifdef EPILOGUE_EXTRA_BARRIER_KLUDGE
  1520. +       EPILOGUE_EXTRA_BARRIER_KLUDGE(stream);
  1521. + #endif
  1522.         return;
  1523.       }
  1524. ***************
  1525. *** 330,333 ****
  1526. --- 382,388 ----
  1527.       mask |= 1 << regno;
  1528.         }
  1529. + #ifdef EPILOGUE_EXTRA_RESTORE
  1530. +   EPILOGUE_EXTRA_RESTORE(mask, nregs);
  1531. + #endif
  1532.     offset = foffset + nregs * 4;
  1533.     if (offset + fsize >= 0x8000
  1534. ***************
  1535. *** 511,514 ****
  1536. --- 566,575 ----
  1537.       }
  1538.     if (frame_pointer_needed)
  1539. + #ifndef MOTOROLA
  1540. +     if (TARGET_STACKEXTEND && current_function_calls_alloca)
  1541. +       asm_fprintf (stream, "\tjra ___unlk_%s_rts\n",
  1542. +                    reg_names[FRAME_POINTER_REGNUM]);
  1543. +       else
  1544. + #endif
  1545.       fprintf (stream, "\tunlk %s\n",
  1546.            reg_names[FRAME_POINTER_REGNUM]);
  1547. ***************
  1548. *** 534,541 ****
  1549.       }
  1550.       }
  1551.     if (current_function_pops_args)
  1552.       asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
  1553.     else
  1554. !     fprintf (stream, "\trts\n");
  1555.   }
  1556.   
  1557. --- 595,607 ----
  1558.       }
  1559.       }
  1560. + #ifdef EPILOGUE_EXTRA_TEST
  1561. +   EPILOGUE_EXTRA_TEST(stream);
  1562. + #endif
  1563.     if (current_function_pops_args)
  1564.       asm_fprintf (stream, "\trtd %0I%d\n", current_function_pops_args);
  1565.     else
  1566. !     if (!TARGET_STACKEXTEND ||
  1567. !        !frame_pointer_needed || !current_function_calls_alloca)
  1568. !       fprintf (stream, "\trts\n");
  1569.   }
  1570.   
  1571. ***************
  1572. *** 980,989 ****
  1573.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1574.       {
  1575.         if (reg == 0)
  1576.       abort ();
  1577.   
  1578. !       pic_ref = gen_rtx (MEM, Pmode,
  1579. !              gen_rtx (PLUS, Pmode,
  1580. !                   pic_offset_table_rtx, orig));
  1581.         current_function_uses_pic_offset_table = 1;
  1582.         RTX_UNCHANGING_P (pic_ref) = 1;
  1583. --- 1046,1063 ----
  1584.     if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
  1585.       {
  1586. + #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1587. +   if (LEGITIMATE_BASEREL_OPERAND_P (orig))
  1588. +     return orig;
  1589. + #endif
  1590.         if (reg == 0)
  1591.       abort ();
  1592.   
  1593. !       if (flag_pic >= 3)
  1594. !     pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
  1595. !       else
  1596. !         pic_ref = gen_rtx (MEM, Pmode,
  1597. !                gen_rtx (PLUS, Pmode,
  1598. !                     pic_offset_table_rtx, orig));
  1599.         current_function_uses_pic_offset_table = 1;
  1600.         RTX_UNCHANGING_P (pic_ref) = 1;
  1601. ***************
  1602. *** 2436,2439 ****
  1603. --- 2510,2517 ----
  1604.               if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
  1605.                 fprintf (file, ":l");
  1606. +             if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
  1607. +               fprintf (file, ":W");
  1608. +             if ((flag_pic == 4) && (breg == pic_offset_table_rtx))
  1609. +               fprintf (file, ":L");
  1610.             }
  1611.           if (addr != 0 && ireg != 0)
  1612. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/m68k.md gcc-2.7.0-amiga/config/m68k/m68k.md
  1613. *** /usr/goinfre/gcc-2.7.0/config/m68k/m68k.md    Thu Jun 15 21:52:50 1995
  1614. --- gcc-2.7.0-amiga/config/m68k/m68k.md    Fri Jun 23 11:52:20 1995
  1615. ***************
  1616. *** 446,450 ****
  1617.     "
  1618.   {
  1619. !   if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1620.       {
  1621.         /* The source is an address which requires PIC relocation.  
  1622. --- 446,454 ----
  1623.     "
  1624.   {
  1625. !   if (flag_pic && symbolic_operand (operands[1], SImode)
  1626. ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1627. !       && (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  1628. ! #endif
  1629. !      )
  1630.       {
  1631.         /* The source is an address which requires PIC relocation.  
  1632. ***************
  1633. *** 793,803 ****
  1634.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1635.       {
  1636. !       /* The source is an address which requires PIC relocation.  
  1637. !          Call legitimize_pic_address with the source, mode, and a relocation
  1638. !          register (a new pseudo, or the final destination if reload_in_progress
  1639. !          is set).   Then fall through normally */
  1640. !       extern rtx legitimize_pic_address();
  1641. !       rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1642. !       operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1643.       }
  1644.   }")
  1645. --- 797,812 ----
  1646.     if (flag_pic && symbolic_operand (operands[1], SImode)) 
  1647.       {
  1648. ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
  1649. !       if (flag_pic < 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
  1650. ! #endif
  1651. !       {
  1652. !         /* The source is an address which requires PIC relocation.  
  1653. !            Call legitimize_pic_address with the source, mode, and a relocation
  1654. !            register (a new pseudo, or the final destination if reload_in_progress
  1655. !            is set).   Then fall through normally */
  1656. !         extern rtx legitimize_pic_address();
  1657. !         rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
  1658. !         operands[1] = legitimize_pic_address (operands[1], SImode, temp);
  1659. !       }
  1660.       }
  1661.   }")
  1662. ***************
  1663. *** 2161,2166 ****
  1664.         /* These insns can result from reloads to access
  1665.        stack slots over 64k from the frame pointer.  */
  1666. !       if (GET_CODE (operands[2]) == CONST_INT
  1667. !       && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000)
  1668.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1669.   #ifdef SGS
  1670. --- 2170,2176 ----
  1671.         /* These insns can result from reloads to access
  1672.        stack slots over 64k from the frame pointer.  */
  1673. !       if (((GET_CODE (operands[2]) == CONST_INT
  1674. !        && INTVAL (operands[2]) + 0x8000 >= (unsigned) 0x10000))
  1675. !       || (flag_pic == 4 && operands[1] == pic_offset_table_rtx))
  1676.           return \"move%.l %2,%0\;add%.l %1,%0\";
  1677.   #ifdef SGS
  1678. ***************
  1679. *** 5881,5885 ****
  1680.     "
  1681.   {
  1682. !   if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1683.   #ifdef MOTOROLA
  1684.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  1685. --- 5891,5895 ----
  1686.     "
  1687.   {
  1688. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
  1689.   #ifdef MOTOROLA
  1690.       SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
  1691. ***************
  1692. *** 5896,5900 ****
  1693.     ;; Operand 1 not really used on the m68000.
  1694.   
  1695. !   "! flag_pic"
  1696.     "*
  1697.   #ifdef MOTOROLA
  1698. --- 5906,5910 ----
  1699.     ;; Operand 1 not really used on the m68000.
  1700.   
  1701. !   "(! flag_pic || flag_pic >= 3)"
  1702.     "*
  1703.   #ifdef MOTOROLA
  1704. ***************
  1705. *** 5916,5920 ****
  1706.     ;; Operand 1 not really used on the m68000.
  1707.   
  1708. !   "flag_pic"
  1709.     "*
  1710.   #ifdef MOTOROLA
  1711. --- 5926,5930 ----
  1712.     ;; Operand 1 not really used on the m68000.
  1713.   
  1714. !   "(flag_pic && flag_pic < 3)"
  1715.     "*
  1716.   #ifdef MOTOROLA
  1717. ***************
  1718. *** 5941,5945 ****
  1719.     "
  1720.   {
  1721. !   if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1722.   #ifdef MOTOROLA
  1723.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  1724. --- 5951,5955 ----
  1725.     "
  1726.   {
  1727. !   if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
  1728.   #ifdef MOTOROLA
  1729.       SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
  1730. ***************
  1731. *** 5956,5960 ****
  1732.             (match_operand:SI 2 "general_operand" "g")))]
  1733.     ;; Operand 2 not really used on the m68000.
  1734. !   "! flag_pic"
  1735.     "*
  1736.   #ifdef MOTOROLA
  1737. --- 5966,5970 ----
  1738.             (match_operand:SI 2 "general_operand" "g")))]
  1739.     ;; Operand 2 not really used on the m68000.
  1740. !   "(! flag_pic || flag_pic >= 3)"
  1741.     "*
  1742.   #ifdef MOTOROLA
  1743. ***************
  1744. *** 5976,5980 ****
  1745.             (match_operand:SI 2 "general_operand" "g")))]
  1746.     ;; Operand 2 not really used on the m68000.
  1747. !   "flag_pic"
  1748.     "*
  1749.   #ifdef MOTOROLA
  1750. --- 5986,5990 ----
  1751.             (match_operand:SI 2 "general_operand" "g")))]
  1752.     ;; Operand 2 not really used on the m68000.
  1753. !   "(flag_pic && flag_pic < 3)"
  1754.     "*
  1755.   #ifdef MOTOROLA
  1756. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/t-amigados gcc-2.7.0-amiga/config/m68k/t-amigados
  1757. *** /usr/goinfre/gcc-2.7.0/config/m68k/t-amigados
  1758. --- gcc-2.7.0-amiga/config/m68k/t-amigados    Fri Jun 23 11:52:21 1995
  1759. ***************
  1760. *** 0 ****
  1761. --- 1,352 ----
  1762. + # Makefile fragment for amigados target.
  1763. + # We generate two additional things:
  1764. + #
  1765. + # libb/libgcc.a
  1766. + #    A base relative version of libgcc.a which is used when compiling and
  1767. + #    linking with the '-resident' option.
  1768. + #
  1769. + # libb/libm020/libgcc.a
  1770. + #    An accelerated base relative version of libgcc.a which is used when
  1771. + #    compiling and linking with the '-mc68020' & '-resident' options.
  1772. + #
  1773. + # libm020/libgcc.a
  1774. + #    An accelerated version of libgcc.a which is used when compiling and
  1775. + #    linking with the '-mc68020' option.
  1776. + #
  1777. + # xgccv
  1778. + #    A forking gcc instead of one calling ssytem(). This makes it less
  1779. + #    system conformant (can't ^C it when started from make), while providing
  1780. + #    increased functionality (-pipe option).
  1781. + # Use the vfork'ing version of gcc by default, so that the -pipe option can
  1782. + # get tested.  To use the regular version just do "make XGCC=gcc".  Note that
  1783. + # PIPE is defined in x-amigados, so if we are doing a native build, it will
  1784. + # be defined.  It can be overridden with "make PIPE=".
  1785. + XGCC = xgccv $(PIPE)
  1786. + GCC_FOR_TARGET = ./$(XGCC) -B./
  1787. + # Build residentable versions of the gcc executables by default.  Use
  1788. + # "make RESIDENT=" to build non-residentable versions.
  1789. + # Note:  This failed during bootstrapping of 2.5.5.
  1790. + #RESIDENT = -resident
  1791. + # The standard additional target flags for the compiler.
  1792. + T_CFLAGS = $(RESIDENT)
  1793. + # Allow the user to override the default target optimizations with gcc, or if
  1794. + # the target compiler is not gcc and doesn't understand -O<N>.
  1795. + T_OPTIMISE = -O2
  1796. + # Each compilation environment (Manx, Dice, GCC, SAS/C, etc) provides its
  1797. + # own equivalent of the UNIX /usr/include tree.  For gcc, the standard headers
  1798. + # are in /gnu/include and system specific headers are in /gnu/os-include.
  1799. + # Use these paths for fixincludes.
  1800. + SYSTEM_HEADER_DIR = /gnu/include
  1801. + OTHER_FIXINCLUDES_DIRS = /gnu/os-include
  1802. + # We don't need a libgcc1, it's all in ixemul.library
  1803. + LIBGCC1 = libgcc1.null
  1804. + # Flags to use when compiling the normal version of libgcc.a.
  1805. + # Don't compile with debugging, as long as there is no debugger.
  1806. + # Explicitly leave out the -resident compilation flag and don't use T_CFLAGS.
  1807. + LIBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1808. +           $(CROSS_GCC_CFLAGS)
  1809. + # Flags to use when compiling the base relative version of libgcc.a.
  1810. + # Don't compile with debugging, as long as there is no debugger.
  1811. + # Explicitly force -resident in the compilation flags and don't use T_CFLAGS.
  1812. + LIBBGCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1813. +           $(CROSS_GCC_CFLAGS) -resident
  1814. + # Flags to use when compiling the 68020 versions of libgcc.a.
  1815. + # Don't compile with debugging, as long as there is no debugger.
  1816. + # Explicitly force -mc68020 in the compilation flags and don't use T_CFLAGS.
  1817. + LIBM020GCC2_CFLAGS = $(T_OPTIMIZE) $(INTERNAL_CFLAGS) $(X_CFLAGS) $(CFLAGS) \
  1818. +           $(CROSS_GCC_CFLAGS) -mc68020
  1819. + # Flags to use when compiling the base relative 68020 versions of libgcc.a.
  1820. + # Don't compile with debugging, as long as there is no debugger.
  1821. + # Explicitly force -mc68020 & -resident in the compilation flags and don't use
  1822. + # T_CFLAGS.
  1823. + LIBBM020GCC2_CFLAGS = $(LIBBGCC2_CFLAGS) -mc68020
  1824. + # Build the base relative library and accelerated libraries.
  1825. + # It is later copied into /gnu/lib/gcc-lib/amigados/<version>/libb/libgcc.a, whereas
  1826. + # libgcc.a is copied into /gnu/lib/gcc-lib/amigados/<version>/libgcc.a.
  1827. + # Accelerated libraries are copied into same directories, with an extra dir level
  1828. + # libm020, thus libb/libm020. It doesn't work very well to define one of the
  1829. + # EXTRA_* macros to contain libb/libgcc.a, particularly for doing "make stageN"
  1830. + # or "make install".
  1831. + GCC_PARTS=$(GCC_PASSES) libgcc.a libb/libgcc.a libm020/libgcc.a \
  1832. +         libb/libm020/libgcc.a $(EXTRA_PROGRAMS) $(USE_COLLECT2) $(EXTRA_PARTS)
  1833. + # Add install_libbgcc to normal define of INSTALL_LIBGCC.  Let install-gccv
  1834. + # hitch a ride on here as well.
  1835. + INSTALL_LIBGCC = install-libgcc install-libbgcc install-libm020gcc install-libbm020gcc install-gccv
  1836. + # This includes the knowledge that target amigados doesn't need libgcc1.a
  1837. + libb/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
  1838. +    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  1839. + # Actually build it in tmplibbgcc.a, then rename at end,
  1840. + # so that libb/libgcc.a itself remains nonexistent if compilation is aborted.
  1841. +     -rm -f tmplibbgcc.a
  1842. + # -e causes any failing command to make this rule fail.
  1843. + # -e doesn't work in certain shells, so we test $$? as well.
  1844. +     set -e; \
  1845. +     for name in $(LIB2FUNCS); \
  1846. +     do \
  1847. +       echo $${name}; \
  1848. +       $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  1849. +           $(srcdir)/libgcc2.c -o $${name}.o; \
  1850. +       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1851. +       $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1852. +       rm -f $${name}.o; \
  1853. +     done
  1854. + # Some shells crash when a loop has no items.
  1855. + # So make sure there is always at least one--`..'.
  1856. + # Then ignore it.
  1857. + # We don't use -e here because there are if statements
  1858. + # that should not make the command give up when the if condition is false.
  1859. + # Instead, we test for failure after each command where it matters.
  1860. +     -for file in .. $(LIB2FUNCS_EXTRA); \
  1861. +     do \
  1862. +       if [ x$${file} != x.. ]; then \
  1863. +         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  1864. +         echo $${name}; \
  1865. +         if [ $${name}.asm = $${file} ]; then \
  1866. +           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  1867. +         else true; fi; \
  1868. +         $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  1869. +         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1870. +         $(AR) $(AR_FLAGS) tmplibbgcc.a $${name}.o; \
  1871. +         rm -f $${name}.[so]; \
  1872. +       else true; \
  1873. +       fi; \
  1874. +     done
  1875. +     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbgcc.a; else true; fi
  1876. +     -if [ -d libb ] ; then true ; else mkdir libb ; fi
  1877. +     mv tmplibbgcc.a libb/libgcc.a
  1878. + install-libbgcc: libb/libgcc.a install-dir
  1879. +     -if [ -d $(libsubdir)/libb ] ; then true ; else mkdir $(libsubdir)/libb ; fi
  1880. +     -if [ -f libb/libgcc.a ] ; then \
  1881. +       rm -f $(libsubdir)/libb/libgcc.a; \
  1882. +       $(INSTALL_DATA) libb/libgcc.a $(libsubdir)/libb/libgcc.a; \
  1883. +       if $(RANLIB_TEST) ; then \
  1884. +         (cd $(libsubdir)/libb; $(RANLIB) libgcc.a); else true; fi; \
  1885. +       chmod a-x $(libsubdir)/libb/libgcc.a; \
  1886. +     else true; fi
  1887. + libm020/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
  1888. +    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  1889. + # Actually build it in tmplibm020gcc.a, then rename at end,
  1890. + # so that libm020/libgcc.a itself remains nonexistent if compilation is aborted.
  1891. +     -rm -f tmplibm020gcc.a
  1892. + # -e causes any failing command to make this rule fail.
  1893. + # -e doesn't work in certain shells, so we test $$? as well.
  1894. +     set -e; \
  1895. +     for name in $(LIB2FUNCS); \
  1896. +     do \
  1897. +       echo $${name}; \
  1898. +       $(GCC_FOR_TARGET) $(LIBM020GCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  1899. +           $(srcdir)/libgcc2.c -o $${name}.o; \
  1900. +       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1901. +       $(AR) $(AR_FLAGS) tmplibm020gcc.a $${name}.o; \
  1902. +       rm -f $${name}.o; \
  1903. +     done
  1904. + # Some shells crash when a loop has no items.
  1905. + # So make sure there is always at least one--`..'.
  1906. + # Then ignore it.
  1907. + # We don't use -e here because there are if statements
  1908. + # that should not make the command give up when the if condition is false.
  1909. + # Instead, we test for failure after each command where it matters.
  1910. +     -for file in .. $(LIB2FUNCS_EXTRA); \
  1911. +     do \
  1912. +       if [ x$${file} != x.. ]; then \
  1913. +         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  1914. +         echo $${name}; \
  1915. +         if [ $${name}.asm = $${file} ]; then \
  1916. +           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  1917. +         else true; fi; \
  1918. +         $(GCC_FOR_TARGET) $(LIBBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \
  1919. +         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1920. +         $(AR) $(AR_FLAGS) tmplibm020gcc.a $${name}.o; \
  1921. +         rm -f $${name}.[so]; \
  1922. +       else true; \
  1923. +       fi; \
  1924. +     done
  1925. +     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibm020gcc.a; else true; fi
  1926. +     -if [ -d libm020 ] ; then true ; else mkdir libm020 ; fi
  1927. +     mv tmplibm020gcc.a libm020/libgcc.a
  1928. + install-libm020gcc: libm020/libgcc.a install-dir
  1929. +     -if [ -d $(libsubdir)/libm020 ] ; then true ; else mkdir $(libsubdir)/libm020 ; fi
  1930. +     -if [ -f libm020/libgcc.a ] ; then \
  1931. +       rm -f $(libsubdir)/libm020/libgcc.a; \
  1932. +       $(INSTALL_DATA) libm020/libgcc.a $(libsubdir)/libm020/libgcc.a; \
  1933. +       if $(RANLIB_TEST) ; then \
  1934. +         (cd $(libsubdir)/libm020; $(RANLIB) libgcc.a); else true; fi; \
  1935. +       chmod a-x $(libsubdir)/libm020/libgcc.a; \
  1936. +     else true; fi
  1937. + libb/libm020/libgcc.a: libgcc1.null libgcc2.c libgcc2.ready $(CONFIG_H) \
  1938. +    $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status
  1939. + # Actually build it in tmplibbm020gcc.a, then rename at end,
  1940. + # so that libb/libm020/libgcc.a itself remains nonexistent if compilation is aborted.
  1941. +     -rm -f tmplibbm020gcc.a
  1942. + # -e causes any failing command to make this rule fail.
  1943. + # -e doesn't work in certain shells, so we test $$? as well.
  1944. +     set -e; \
  1945. +     for name in $(LIB2FUNCS); \
  1946. +     do \
  1947. +       echo $${name}; \
  1948. +       $(GCC_FOR_TARGET) $(LIBBM020GCC2_CFLAGS) $(INCLUDES) -c -DL$${name} \
  1949. +           $(srcdir)/libgcc2.c -o $${name}.o; \
  1950. +       if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1951. +       $(AR) $(AR_FLAGS) tmplibbm020gcc.a $${name}.o; \
  1952. +       rm -f $${name}.o; \
  1953. +     done
  1954. + # Some shells crash when a loop has no items.
  1955. + # So make sure there is always at least one--`..'.
  1956. + # Then ignore it.
  1957. + # We don't use -e here because there are if statements
  1958. + # that should not make the command give up when the if condition is false.
  1959. + # Instead, we test for failure after each command where it matters.
  1960. +     -for file in .. $(LIB2FUNCS_EXTRA); \
  1961. +     do \
  1962. +       if [ x$${file} != x.. ]; then \
  1963. +         name=`echo $${file} | sed -e 's/[.]c$$//' -e 's/[.]asm$$//'`; \
  1964. +         echo $${name}; \
  1965. +         if [ $${name}.asm = $${file} ]; then \
  1966. +           cp $${file} $${name}.s || exit 1; file=$${name}.s; \
  1967. +         else true; fi; \
  1968. +         $(GCC_FOR_TARGET) $(LIBBGCC2CFLAGS) $(INCLUDES) -c $${file}; \
  1969. +         if [ $$? -eq 0 ] ; then true; else exit 1; fi; \
  1970. +         $(AR) $(AR_FLAGS) tmplibbm020gcc.a $${name}.o; \
  1971. +         rm -f $${name}.[so]; \
  1972. +       else true; \
  1973. +       fi; \
  1974. +     done
  1975. +     -if $(RANLIB_TEST) ; then $(RANLIB) tmplibbm020gcc.a; else true; fi
  1976. +     -if [ -d libb ] ; then true ; else mkdir libb ; fi
  1977. +     -if [ -d libb/libm020 ] ; then true ; else mkdir libb/libm020 ; fi
  1978. +     mv tmplibbm020gcc.a libb/libm020/libgcc.a
  1979. + install-libbm020gcc: libb/libm020/libgcc.a install-dir
  1980. +     -if [ -d $(libsubdir)/libb/libm020 ] ; then true ; else mkdir $(libsubdir)/libb/libm020 ; fi
  1981. +     -if [ -f libb/libm020/libgcc.a ] ; then \
  1982. +       rm -f $(libsubdir)/libb/libm020/libgcc.a; \
  1983. +       $(INSTALL_DATA) libb/libm020/libgcc.a $(libsubdir)/libb/libm020/libgcc.a; \
  1984. +       if $(RANLIB_TEST) ; then \
  1985. +         (cd $(libsubdir)/libb/libm020; $(RANLIB) libgcc.a); else true; fi; \
  1986. +       chmod a-x $(libsubdir)/libb/libm020/libgcc.a; \
  1987. +     else true; fi
  1988. + # PhB:
  1989. + # toplev.o target need to define additional flags to handle stack
  1990. + # allocation in real main. As for now we hack building of toplev.o
  1991. + # defining MAYBE_USE_COLLECT2 flag, which is only used for toplev.o.
  1992. + # Then we define EXTRA_OBJS to amigasup.o.
  1993. + MAYBE_USE_COLLECT2= -Dmain=stkmain -Dexit=stkexit
  1994. + EXTRA_OBJS = amigasup.o
  1995. + # The default gcc (xgcc) is built without -DAMIGADOS_FORK_GCC. This gcc (xgccv)
  1996. + # is built with AMIGADOS_FORK_GCC defined, so that it can use '-pipe'.  We
  1997. + # don't want to define EXTRA_PASSES to xgccv because that will cause xgccv
  1998. + # to be installed in $(libsubdir), so instead we use the default GCC_PASSES
  1999. + # and add xgccv to it.
  2000. + GCC_PASSES = xgcc xgccv cc1 cpp $(EXTRA_PASSES)
  2001. + xgccv: xgccv.o version.o $(LIBDEPS)
  2002. +     $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o xgccv xgccv.o version.o $(LIBS)
  2003. + xgccv.o: gcc.c $(CONFIG_H) config.status
  2004. +     $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  2005. +   -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \
  2006. +   -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \
  2007. +   -DDEFAULT_TARGET_VERSION=\"$(version)\" \
  2008. +   -DDEFAULT_TARGET_MACHINE=\"$(target)\" \
  2009. +   -DTOOLDIR_BASE_PREFIX=\"$(exec_prefix)/\" \
  2010. +   -DAMIGADOS_FORK_GCC \
  2011. +   -c `echo $(srcdir)/gcc.c | sed 's,^\./,,'` -o xgccv.o
  2012. + install-gccv: xgccv
  2013. +     rm -f $(bindir)/gccv
  2014. +     $(INSTALL_PROGRAM) xgccv $(bindir)/gccv
  2015. + # When making one of the stage<N> dirs, we need to make subdirs for
  2016. + # additional libraries, and copy them there. base-relative libraries
  2017. + # and accelerated libraries are preserved through stages.
  2018. + EXTRA_STAGE1_TARGETS = stage1-libamiga
  2019. + EXTRA_STAGE2_TARGETS = stage2-libamiga
  2020. + EXTRA_STAGE3_TARGETS = stage3-libamiga
  2021. + EXTRA_STAGE4_TARGETW = stage4-libamiga
  2022. + stage1-libamiga:
  2023. +     -if [ -d stage1 ] ; then true ; else mkdir stage1 ; fi
  2024. +     -if [ -d stage1/libb ] ; then true ; else mkdir stage1/libb ; fi
  2025. +     -if [ -d stage1/libb/libm020 ] ; then true ; else mkdir stage1/libb/libm020 ; fi
  2026. +     -if [ -d stage1/libm020 ] ; then true ; else mkdir stage1/libm020 ; fi
  2027. +     -cp libb/libgcc.a stage1/libb/libgcc.a
  2028. +     -cp libb/libm020/libgcc.a stage1/libb/libm020/libgcc.a
  2029. +     -cp libm020/libgcc.a stage1/libm020/libgcc.a
  2030. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libgcc.i; else true; fi
  2031. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libb/libm020/libgcc.a; else true; fi
  2032. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage1/libm020/libgcc.a; else true; fi
  2033. + stage2-libamiga:
  2034. +     -if [ -d stage2 ] ; then true ; else mkdir stage2 ; fi
  2035. +     -if [ -d stage2/libb ] ; then true ; else mkdir stage2/libb ; fi
  2036. +     -if [ -d stage2/libb/libm020 ] ; then true ; else mkdir stage2/libb/libm020 ; fi
  2037. +     -if [ -d stage2/libm020 ] ; then true ; else mkdir stage2/libm020 ; fi
  2038. +     -cp libb/libgcc.a stage2/libb/libgcc.a
  2039. +     -cp libb/libm020/libgcc.a stage2/libb/libm020/libgcc.a
  2040. +     -cp libm020/libgcc.a stage2/libm020/libgcc.a
  2041. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libgcc.a; else true; fi
  2042. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libb/libm020/libgcc.a; else true; fi
  2043. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage2/libm020/libgcc.a; else true; fi
  2044. + stage3-libamiga:
  2045. +     -if [ -d stage3 ] ; then true ; else mkdir stage3 ; fi
  2046. +     -if [ -d stage3/libb ] ; then true ; else mkdir stage3/libb ; fi
  2047. +     -if [ -d stage3/libb/libm020 ] ; then true ; else mkdir stage3/libb/libm020 ; fi
  2048. +     -if [ -d stage3/libm020 ] ; then true ; else mkdir stage3/libm020 ; fi
  2049. +     -cp libb/libgcc.a stage3/libb/libgcc.a
  2050. +     -cp libb/libm020/libgcc.a stage3/libb/libm020/libgcc.a
  2051. +     -cp libm020/libgcc.a stage3/libm020/libgcc.a
  2052. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libgcc.a; else true; fi
  2053. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libb/libm020/libgcc.a; else true; fi
  2054. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage3/libm020/libgcc.a; else true; fi
  2055. + stage4-libamiga:
  2056. +     -if [ -d stage4 ] ; then true ; else mkdir stage4 ; fi
  2057. +     -if [ -d stage4/libb ] ; then true ; else mkdir stage4/libb ; fi
  2058. +     -if [ -d stage4/libb/libm020 ] ; then true ; else mkdir stage4/libb/libm020 ; fi
  2059. +     -if [ -d stage4/libm020 ] ; then true ; else mkdir stage4/libm020 ; fi
  2060. +     -cp libb/libgcc.a stage4/libb/libgcc.a
  2061. +     -cp libb/libm020/libgcc.a stage4/libb/libm020/libgcc.a
  2062. +     -cp libm020/libgcc.a stage4/libm020/libgcc.a
  2063. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libgcc.a; else true; fi
  2064. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libb/libm020/libgcc.a; else true; fi
  2065. +     -if $(RANLIB_TEST) ; then $(RANLIB) stage4/libm020/libgcc.a; else true; fi
  2066. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/x-amigados gcc-2.7.0-amiga/config/m68k/x-amigados
  2067. *** /usr/goinfre/gcc-2.7.0/config/m68k/x-amigados
  2068. --- gcc-2.7.0-amiga/config/m68k/x-amigados    Fri Jun 23 11:52:21 1995
  2069. ***************
  2070. *** 0 ****
  2071. --- 1,52 ----
  2072. + # Note: It doesn't do any good to try to define prefix or local_prefix
  2073. + # in the host overrides because configure will just change them back.
  2074. + # You either have to give an appropriate option to configure or live with
  2075. + # an Amiga specific patch to configure.  See the note in configure.  -fnf
  2076. + # Building under amigados almost certainly requires an already working gcc.
  2077. + # Use gccv, which is a gcc compiled with AMIGADOS_FORK_GCC so "-pipe" will
  2078. + # work and get exercised.  To bootstrap with the regular gcc just do
  2079. + # "make CC=gcc".  To bootstrap without "-pipe" do "make PIPE=".
  2080. + CC = gccv $(PIPE)
  2081. + # Disable -pipe for now since I had problems bootstrapping gcc 2.5.5 with
  2082. + # it. (fnf)
  2083. + #PIPE = -pipe
  2084. + # Allow the user to override the default host optimization with gcc, or if the
  2085. + # host compiler is not gcc and doesn't understand -O<N>.
  2086. + X_OPTIMIZE = -O2
  2087. + # The standard additional host flags for the compiler.
  2088. + X_CFLAGS = $(X_OPTIMIZE)
  2089. + # Man pages get a wierd suffix...
  2090. + manext = .0
  2091. + # We really shouldn't specify CFLAGS from here, but there's no other way
  2092. + # to get rid of the `-g' indoctrinated by Makefile.in.  Note this becomes
  2093. + # part of both the host compilation CFLAGS and the target compilation
  2094. + # CFLAGS.
  2095. + CFLAGS =
  2096. + # Ranlib does exist, but may not be in a path where the default RANLIB_TEST
  2097. + # expects it, so just force it to true.
  2098. + RANLIB_TEST = true
  2099. + # Until we can make sure no cross-device hardlinks are tried, and until
  2100. + # symlinks can be made in canonical amigados format (dev:path/file), just
  2101. + # use copy with timestamp preservation.  This only wastes some disk space
  2102. + # and means you have to reconfigure if you change any of the files that
  2103. + # would normally be linked to.  -fnf
  2104. + HARDLINK = cp -p
  2105. + SYMLINK = cp -p
  2106. + # Build supplimentary Amiga host support file.
  2107. + amigasup.o: amigasup.c
  2108. diff -2rcN /usr/goinfre/gcc-2.7.0/config/m68k/xm-amigados.h gcc-2.7.0-amiga/config/m68k/xm-amigados.h
  2109. *** /usr/goinfre/gcc-2.7.0/config/m68k/xm-amigados.h
  2110. --- gcc-2.7.0-amiga/config/m68k/xm-amigados.h    Fri Jun 23 11:52:21 1995
  2111. ***************
  2112. *** 0 ****
  2113. --- 1,255 ----
  2114. + /* Configuration for GNU C-compiler for Commodore Amiga, running AmigaDOS.
  2115. +    Copyright (C) 1992 Free Software Foundation, Inc.
  2116. +    Contributed by Markus M. Wild (wild@amiga.physik.unizh.ch).
  2117. + This file is part of GNU CC.
  2118. + GNU CC is free software; you can redistribute it and/or modify
  2119. + it under the terms of the GNU General Public License as published by
  2120. + the Free Software Foundation; either version 2, or (at your option)
  2121. + any later version.
  2122. + GNU CC is distributed in the hope that it will be useful,
  2123. + but WITHOUT ANY WARRANTY; without even the implied warranty of
  2124. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  2125. + GNU General Public License for more details.
  2126. + You should have received a copy of the GNU General Public License
  2127. + along with GNU CC; see the file COPYING.  If not, write to
  2128. + the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  2129. + /* first include the generic header, then modify some parts.. */
  2130. + #include "m68k/xm-m68k.h"
  2131. + /* On the Amiga, there are two pathname separators, '/' (DIR_SEPARATOR)
  2132. +    and ':' (VOL_SEPARATOR).  DIR_SEPARATOR defaults to the correct
  2133. +    character, so we don't have to explicitly set it. */
  2134. + #define VOL_SEPARATOR ':'
  2135. + /* Amiga specific headers, such as from the Native Developer Update kits,
  2136. +    go in SYSTEM_INCLUDE_DIR.  STANDARD_INCLUDE_DIR is the equivalent of
  2137. +    Unix "/usr/include".  All other include paths are set in Makefile. */
  2138. + #define SYSTEM_INCLUDE_DIR    "/gnu/os-include"
  2139. + #define STANDARD_INCLUDE_DIR    "/gnu/include"
  2140. + /* Fork one piped subcommand.  SEARCH_FLAG is the system call to use
  2141. +    (either execv or execvp).  ARGV is the arg vector to use.
  2142. +    NOT_LAST is nonzero if this is not the last subcommand
  2143. +    (i.e. its output should be piped to the next one.)  */
  2144. + #ifndef AMIGADOS_FORK_GCC
  2145. + /* This version uses a more or less amigados-conformant way of running a
  2146. +    program (in the context of the parent). If you want to use -pipe however,
  2147. +    you'll have to use the vfork() version afterwards.
  2148. +    Phil.B: 29-May-94 quick hack (number 20 added to length) because xgcc
  2149. +    doesn't work.
  2150. +  */
  2151. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  2152. + ({char *_argline;                        \
  2153. +   int _arglinelength, _i;                    \
  2154. +                                 \
  2155. +   for (_i = 1, _arglinelength=0; ARGV[_i]; ++_i)        \
  2156. +     _arglinelength += strlen(ARGV[_i]) + 1;            \
  2157. +                                 \
  2158. +   _arglinelength += strlen(PROGRAM) + 20 + 1;            \
  2159. +                                 \
  2160. +   if (!(_argline = (char *)alloca(_arglinelength)))         \
  2161. +     pfatal_with_name ("alloca");                \
  2162. +                                 \
  2163. +   strcpy(_argline, PROGRAM);                    \
  2164. +   for (_i = 1; ARGV[_i]; ++_i)                     \
  2165. +     {                                \
  2166. +       strcat(_argline, " ");                    \
  2167. +       strcat(_argline, ARGV[_i]);                \
  2168. +     }                                \
  2169. +                                 \
  2170. +   ssystem(_argline); })                        \
  2171. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  2172. +   ({ STATUS = COMMAND.pid; })
  2173. + #else
  2174. + /* the vfork() version. This one has the drawback, that gcc is not 
  2175. +    interruptible when started from make, since ixemul.library doesn't yet
  2176. +    propagate ^C to subprocesses. */
  2177. + #define PEXECUTE(SEARCH_FLAG,PROGRAM,ARGV,NOT_LAST) \
  2178. + ({int (*_func)() = (SEARCH_FLAG ? execv : execvp);            \
  2179. +   int _pid;                                \
  2180. +   int _pdes[2];                                \
  2181. +   int _input_desc = last_pipe_input;                    \
  2182. +   int _output_desc = STDOUT_FILE_NO;                    \
  2183. +   int _retries, _sleep_interval, _result;                \
  2184. +                                     \
  2185. +   /* If this isn't the last process, make a pipe for its output,    \
  2186. +      and record it as waiting to be the input to the next process.  */    \
  2187. +                                     \
  2188. +   if (NOT_LAST)                                \
  2189. +     {                                    \
  2190. +       if (pipe (_pdes) < 0)                        \
  2191. +     pfatal_with_name ("pipe");                    \
  2192. +       _output_desc = _pdes[WRITE_PORT];                    \
  2193. +       last_pipe_input = _pdes[READ_PORT];                \
  2194. +     }                                    \
  2195. +   else                                    \
  2196. +     last_pipe_input = STDIN_FILE_NO;                    \
  2197. +                                     \
  2198. +   /* Fork a subprocess; wait and retry if it fails.  */            \
  2199. +   _sleep_interval = 1;                            \
  2200. +   for (_retries = 0; _retries < 4; _retries++)                \
  2201. +     {                                    \
  2202. +       _pid = vfork ();                            \
  2203. +       if (_pid >= 0)                            \
  2204. +     break;                                \
  2205. +       sleep (_sleep_interval);                        \
  2206. +       _sleep_interval *= 2;                        \
  2207. +     }                                    \
  2208. +                                     \
  2209. +   switch (_pid)                                \
  2210. +     {                                    \
  2211. +     case -1:                                \
  2212. +       pfatal_with_name ("vfork");                    \
  2213. +       /* NOTREACHED */                            \
  2214. +       _result = 0;                            \
  2215. +       break;                                \
  2216. +                                     \
  2217. +     case 0: /* child */                            \
  2218. +       /* Move the input and output pipes into place, if nec.  */    \
  2219. +       if (_input_desc != STDIN_FILE_NO)                    \
  2220. +     {                                \
  2221. +       close (STDIN_FILE_NO);                    \
  2222. +       dup (_input_desc);                        \
  2223. +       close (_input_desc);                        \
  2224. +     }                                \
  2225. +       if (_output_desc != STDOUT_FILE_NO)                \
  2226. +     {                                \
  2227. +       close (STDOUT_FILE_NO);                    \
  2228. +       dup (_output_desc);                        \
  2229. +       close (_output_desc);                        \
  2230. +     }                                \
  2231. +                                     \
  2232. +       /* Close the parent's descs that aren't wanted here.  */        \
  2233. +       if (last_pipe_input != STDIN_FILE_NO)                \
  2234. +     close (last_pipe_input);                    \
  2235. +                                     \
  2236. +       /* Exec the program.  */                        \
  2237. +       (*_func) (PROGRAM, ARGV);                        \
  2238. +       perror_exec (PROGRAM);                        \
  2239. +       exit (-1);                            \
  2240. +       /* NOTREACHED */                            \
  2241. +       _result = 0;                            \
  2242. +       break;                                \
  2243. +                                     \
  2244. +     default:                                \
  2245. +       /* In the parent, after forking.                    \
  2246. +      Close the descriptors that we made for this child.  */        \
  2247. +       if (_input_desc != STDIN_FILE_NO)                    \
  2248. +     close (_input_desc);                        \
  2249. +       if (_output_desc != STDOUT_FILE_NO)                \
  2250. +     close (_output_desc);                        \
  2251. +                                     \
  2252. +       /* Return child's process number.  */                \
  2253. +       _result = _pid;                            \
  2254. +       break;                                \
  2255. +     }                                     \
  2256. + _result; })                                \
  2257. + #define PEXECUTE_RESULT(STATUS, COMMAND) \
  2258. +   ({ wait (& STATUS); })
  2259. + #endif /* AMIGADOS_FORK_GCC */
  2260. + /* the following macros are stolen more or less from xm-vms.h ... */
  2261. + /* This macro is used to help compare filenames in cp-lex.c.
  2262. +    We also need to make sure that the names are all lower case, because
  2263. +    we must be able to compare filenames to determine if a file implements
  2264. +    a class.  */
  2265. + #define FILE_NAME_NONDIRECTORY(C)                \
  2266. + ({                                \
  2267. +    extern char *rindex();                    \
  2268. +    char * pnt_ = (C), * pnt1_;                    \
  2269. +    pnt1_ = pnt_ - 1;                        \
  2270. +    while (*++pnt1_)                        \
  2271. +      if ((*pnt1_ >= 'A' && *pnt1_ <= 'Z')) *pnt1_ |= 0x20;    \
  2272. +    pnt1_ = rindex (pnt_, '/');                     \
  2273. +    pnt1_ = (pnt1_ == 0 ? rindex (pnt_, ':') : pnt1_);        \
  2274. +    (pnt1_ == 0 ? pnt_ : pnt1_ + 1);                \
  2275. +  })
  2276. + /* Macro to generate the name of the cross reference file.  The standard
  2277. +    one does not work, since it was written assuming that the conventions
  2278. +    of a unix style filesystem will work on the host system.
  2279. +  
  2280. +    Contrary to VMS, I'm using the original unix filename, there's no reason
  2281. +    not to use this under AmigaDOS. */
  2282. + #define XREF_FILE_NAME(BUFF, NAME)    \
  2283. +   s = FILE_NAME_NONDIRECTORY (NAME);            \
  2284. +   if (s == NAME) sprintf(BUFF, ".%s.gxref", NAME);    \
  2285. +   else {                        \
  2286. +     unsigned char ch = *s; /* could be Latin1 char.. */    \
  2287. +     /* temporary: cut the filename from the directory */\
  2288. +     *s = 0;                        \
  2289. +     sprintf (BUFF, "%s.%c%s.gxref", NAME, ch, s+1);    \
  2290. +     /* and restore the filename */            \
  2291. +     *s = ch;                        \
  2292. +   }                            \
  2293. + /* Macro that is used in cp-xref.c to determine whether a file name is
  2294. +    absolute or not.
  2295. +    This checks for both, '/' as first character, since we're running under
  2296. +    ixemul.library which provides for this unix'ism, and for the usual 
  2297. +    logical-terminator, ':', somewhere in the filename. */
  2298. + #define FILE_NAME_ABSOLUTE_P(NAME) (NAME[0] == '/' || index(NAME, ':'))
  2299. + /* the colon conflicts with the name space of logicals */
  2300. + #define PATH_SEPARATOR ','
  2301. + /* AmigaDOS handles rename(2) *much* better than any link(2)/unlink(2)
  2302. +    hacks. It's actually the inverse case as on Unix. rename(2) was always
  2303. +    there, link(2) is new with OS 2.0 */
  2304. + #define HAVE_rename 1
  2305. + /* Phil.B 17-Apr-95 Added stack checking code submitted by Kriton Kyrimis
  2306. +    (kyrimis@theseas.ntua.gr) on 10-Feb-95, modified for inclusion into gcc
  2307. +    What stackcheck does is to add the following code at the beginning of
  2308. +    each function:
  2309. +     cmpl __StackBottom,sp
  2310. +     bccs .+8
  2311. +     jmp __StackOverflow
  2312. +    _StackBottom and _StackOverflow() are defined in stackchecksetup.c.
  2313. +    _StackBottom is set to the bottom of the stack plus some leeway for
  2314. +    subroutine arguments (128 bytes).  _StackOverflow() sets the stack
  2315. +    pointer to a sane value, prints an error message and exits.
  2316. +    Even with stack checking, you cannot be completely safe, as overflows
  2317. +    are detected on function entry, rather than during function execution.
  2318. +    E.g.,
  2319. +     crash(){
  2320. +       char scribble[100000];
  2321. +       int i;
  2322. +       for (i=0; i<100000; i++) scribble[i]=0;
  2323. +       check(scribble);
  2324. +     }
  2325. +     check(char *x){}
  2326. +    In the above example, stack overflow and its side-effects will occur in
  2327. +    crash(), but it will be detected in check(), when it is too late. (The
  2328. +    same thing happens with SAS/C's stack checking, BTW.)
  2329. + */
  2330. + /* #defined AMIGA_STACK_CHECKING */
  2331. diff -2rcN /usr/goinfre/gcc-2.7.0/configure gcc-2.7.0-amiga/configure
  2332. *** /usr/goinfre/gcc-2.7.0/configure    Thu Jun 15 22:54:14 1995
  2333. --- gcc-2.7.0-amiga/configure    Fri Jun 23 11:52:22 1995
  2334. ***************
  2335. *** 5,8 ****
  2336. --- 5,12 ----
  2337.   #This file is part of GNU CC.
  2338.   
  2339. + # AmigaDOS Notes:  Where "echo" can be invoked with a first arg that
  2340. + # starts with '-', run the external echo instead, since the pdksh builtin
  2341. + # version botches this case.
  2342.   #GNU CC is free software; you can redistribute it and/or modify
  2343.   #it under the terms of the GNU General Public License as published by
  2344. ***************
  2345. *** 54,80 ****
  2346.   # Default --srcdir to the directory where the script is found, 
  2347.   # if a directory was specified.
  2348. ! # The second sed call is to convert `.//configure' to `./configure'.
  2349. ! srcdir=`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`
  2350.   if [ x$srcdir = x$0 ]
  2351.   then
  2352.   srcdir=
  2353.   fi
  2354.   
  2355.   host=
  2356.   
  2357. ! # Default prefix to /usr/local.
  2358. ! prefix=/usr/local
  2359.   # On systems where GCC is the native compiler, $prefix should be
  2360.   # /usr. But the user can change it with configure --prefix=/foo/bar
  2361.   native_prefix=/usr
  2362.    
  2363. ! # local_prefix specifies where to find the directory /usr/local/include
  2364.   # We don't use $(prefix) for this
  2365. ! # because we always want GCC to search /usr/local/include
  2366. ! # even if GCC is installed somewhere other than /usr/local.
  2367.   # Think THREE TIMES before specifying any other value for this!
  2368.   # DO NOT make this use $prefix!
  2369. ! local_prefix=/usr/local
  2370.   # Default is to let the Makefile set exec_prefix from $(prefix)
  2371.   exec_prefix='$(prefix)'
  2372. --- 58,100 ----
  2373.   # Default --srcdir to the directory where the script is found, 
  2374.   # if a directory was specified.
  2375. ! # The first sed call works around a bug in the AmigaDOS port of sksh, where
  2376. ! # $0 has a trailing slash appended to it.  It is a NOP for other systems.
  2377. ! # The third sed call is to convert `.//configure' to `./configure'.
  2378. ! srcdir=`echo $0 | sed 's|/$||' | sed 's|//|/|' | sed 's|/[^/]*$||'`
  2379.   if [ x$srcdir = x$0 ]
  2380.   then
  2381.   srcdir=
  2382.   fi
  2383. + # On systems where GCC is the native compiler, $prefix should be
  2384. + # /usr. But the user can change it with configure --prefix=/foo/bar
  2385. + native_prefix=/usr
  2386. +  
  2387.   
  2388.   host=
  2389.   
  2390. ! # Note:  For AmigaDOS we want this to default to /gnu unless we specify
  2391. ! # otherwise to configure.  We also don't want to have to remember to always
  2392. ! # configure with "--prefix=/gnu".  Changing it in Makefile.in or in
  2393. ! # config/m68k/x-amigados is ineffective since configure will always change
  2394. ! # it back in the final generated Makefile, so we have to go to the root of
  2395. ! # the problem, which is here.  There should be a way to do this in the
  2396. ! # individual machine configuration files!  -fnf
  2397. ! # here.  -fnf
  2398. ! # Default prefix to "/gnu".
  2399. ! prefix=/gnu
  2400. !   
  2401.   # On systems where GCC is the native compiler, $prefix should be
  2402.   # /usr. But the user can change it with configure --prefix=/foo/bar
  2403.   native_prefix=/usr
  2404.    
  2405. ! # local_prefix specifies where to find the directory /gnu/local/include
  2406.   # We don't use $(prefix) for this
  2407. ! # because we always want GCC to search /gnu/local/include
  2408. ! # even if GCC is installed somewhere other than /gnu/local.
  2409.   # Think THREE TIMES before specifying any other value for this!
  2410.   # DO NOT make this use $prefix!
  2411. ! # Note:  See AmigaDOS note above for this AmigaDOS specific change.  -fnf
  2412. ! # NoteII:We don't want to have yet-another-assign so we use /gnu/local
  2413. ! local_prefix=/gnu/local
  2414.   # Default is to let the Makefile set exec_prefix from $(prefix)
  2415.   exec_prefix='$(prefix)'
  2416. ***************
  2417. *** 88,93 ****
  2418.   
  2419.   remove=rm
  2420. ! hard_link=ln
  2421. ! symbolic_link='ln -s'
  2422.   copy=cp
  2423.   
  2424. --- 108,118 ----
  2425.   
  2426.   remove=rm
  2427. ! # AmigaDOS specific change.  Although we support symbolic links using
  2428. ! # the GNU tools, they need to be made using the syntax "somewhere:foo/bar"
  2429. ! # and not "/somewhere/foo/bar", since they must be in standard AmigaDOS
  2430. ! # format.  This should probably be done by having GNU ln translate paths
  2431. ! # that start with '/' to canonical AmigaDOS device:name form.
  2432. ! hard_link=cp
  2433. ! symbolic_link=cp
  2434.   copy=cp
  2435.   
  2436. ***************
  2437. *** 145,149 ****
  2438.       # Double any backslashes or dollar signs in the argument.
  2439.       if [ -n "${arg}" ] ; then
  2440. !       program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  2441.       fi
  2442.       program_transform_set=yes
  2443. --- 170,174 ----
  2444.       # Double any backslashes or dollar signs in the argument.
  2445.       if [ -n "${arg}" ] ; then
  2446. !       program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  2447.       fi
  2448.       program_transform_set=yes
  2449. ***************
  2450. *** 152,156 ****
  2451.     --program-prefix)
  2452.       if [ -n "${arg}" ]; then
  2453. !       program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2454.       fi
  2455.       program_transform_set=yes
  2456. --- 177,181 ----
  2457.     --program-prefix)
  2458.       if [ -n "${arg}" ]; then
  2459. !       program_transform_name="${program_transform_name} -e s,^,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2460.       fi
  2461.       program_transform_set=yes
  2462. ***************
  2463. *** 159,163 ****
  2464.     --program-suffix)
  2465.       if [ -n "${arg}" ]; then
  2466. !       program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2467.       fi
  2468.       program_transform_set=yes
  2469. --- 184,188 ----
  2470.     --program-suffix)
  2471.       if [ -n "${arg}" ]; then
  2472. !       program_transform_name="${program_transform_name} -e s,\$\$,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2473.       fi
  2474.       program_transform_set=yes
  2475. ***************
  2476. *** 183,187 ****
  2477.       ;;
  2478.        -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  2479. !     srcdir=`echo $arg | sed 's/-*s[a-z]*=//'`
  2480.       ;;
  2481.        -host | --host | --hos | --ho)
  2482. --- 208,212 ----
  2483.       ;;
  2484.        -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  2485. !     srcdir=`/bin/echo $arg | sed 's/-*s[a-z]*=//'`
  2486.       ;;
  2487.        -host | --host | --hos | --ho)
  2488. ***************
  2489. *** 189,193 ****
  2490.       ;;
  2491.        -host=* | --host=* | --hos=* | --ho=*)
  2492. !     host=`echo $arg | sed 's/-*h[a-z]*=//'`
  2493.       ;; 
  2494.        -target | --target | --targe | --targ | --tar | --ta | --t)
  2495. --- 214,218 ----
  2496.       ;;
  2497.        -host=* | --host=* | --hos=* | --ho=*)
  2498. !     host=`/bin/echo $arg | sed 's/-*h[a-z]*=//'`
  2499.       ;; 
  2500.        -target | --target | --targe | --targ | --tar | --ta | --t)
  2501. ***************
  2502. *** 195,199 ****
  2503.       ;;
  2504.        -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  2505. !     target=`echo $arg | sed 's/-*t[a-z]*=//'`
  2506.       ;; 
  2507.        -build | --build | --buil | --bui | --bu | --b)
  2508. --- 220,224 ----
  2509.       ;;
  2510.        -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  2511. !     target=`/bin/echo $arg | sed 's/-*t[a-z]*=//'`
  2512.       ;; 
  2513.        -build | --build | --buil | --bui | --bu | --b)
  2514. ***************
  2515. *** 201,205 ****
  2516.       ;;
  2517.        -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  2518. !     build=`echo $arg | sed 's/-*b[a-z]*=//'`
  2519.       ;; 
  2520.        -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  2521. --- 226,230 ----
  2522.       ;;
  2523.        -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  2524. !     build=`/bin/echo $arg | sed 's/-*b[a-z]*=//'`
  2525.       ;; 
  2526.        -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  2527. ***************
  2528. *** 207,211 ****
  2529.       ;;
  2530.        -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  2531. !     prefix=`echo $arg | sed 's/-*p[a-z]*=//'`
  2532.       native_prefix=$prefix
  2533.       ;;
  2534. --- 232,236 ----
  2535.       ;;
  2536.        -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  2537. !     prefix=`/bin/echo $arg | sed 's/-*p[a-z]*=//'`
  2538.       native_prefix=$prefix
  2539.       ;;
  2540. ***************
  2541. *** 217,221 ****
  2542.       | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  2543.       | --loc=* | --lo=* | --l=*)
  2544. !     local_prefix=`echo $arg | sed 's/-*l[-a-z]*=//'`
  2545.       ;;
  2546.        -gxx-include-dir | --gxx-include-dir | --gxx-include \
  2547. --- 242,246 ----
  2548.       | --local-pre=* | --local-pr=* | --local-p=* | --local-=* | --local=* \
  2549.       | --loc=* | --lo=* | --l=*)
  2550. !     local_prefix=`/bin/echo $arg | sed 's/-*l[-a-z]*=//'`
  2551.       ;;
  2552.        -gxx-include-dir | --gxx-include-dir | --gxx-include \
  2553. ***************
  2554. *** 227,231 ****
  2555.       | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  2556.       | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  2557. !     gxx_include_dir=`echo $arg | sed 's/-*g[-a-z]*=//'`
  2558.       ;;
  2559.        -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  2560. --- 252,256 ----
  2561.       | --gxx-incl=* | --gxx-inc=* | --gxx-in=* | --gxx-i=* \
  2562.       | --gxx-=* | --gxx=* | --gxx=* | --gxx=* | --g=*)
  2563. !     gxx_include_dir=`/bin/echo $arg | sed 's/-*g[-a-z]*=//'`
  2564.       ;;
  2565.        -exec-prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre \
  2566. ***************
  2567. *** 236,240 ****
  2568.       | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  2569.       | --exe=* | --ex=* | --e=*)
  2570. !     exec_prefix=`echo $arg | sed 's/-*e[-a-z]*=//'`
  2571.       ;;
  2572.        -program-transform-name | --program-transform-name \
  2573. --- 261,265 ----
  2574.       | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* \
  2575.       | --exe=* | --ex=* | --e=*)
  2576. !     exec_prefix=`/bin/echo $arg | sed 's/-*e[-a-z]*=//'`
  2577.       ;;
  2578.        -program-transform-name | --program-transform-name \
  2579. ***************
  2580. *** 252,259 ****
  2581.       | --program-transf=* | --program-trans=* | --program-tran=* \
  2582.       | --program-tra=* | --program-tr=* | --program-t=*)
  2583. !     arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  2584.       # Double any \ or $ in the argument.
  2585.       if [ -n "${arg}" ] ; then
  2586. !       program_transform_name="${program_transform_name} -e `echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  2587.       fi
  2588.       program_transform_set=yes
  2589. --- 277,284 ----
  2590.       | --program-transf=* | --program-trans=* | --program-tran=* \
  2591.       | --program-tra=* | --program-tr=* | --program-t=*)
  2592. !     arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  2593.       # Double any \ or $ in the argument.
  2594.       if [ -n "${arg}" ] ; then
  2595. !       program_transform_name="${program_transform_name} -e `/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
  2596.       fi
  2597.       program_transform_set=yes
  2598. ***************
  2599. *** 267,273 ****
  2600.       | --program-pref=* | --program-pre=* | --program-pr=* \
  2601.       | --program-p=*)
  2602. !     arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  2603.       if [ -n "${arg}" ]; then
  2604. !       program_transform_name="${program_transform_name} -e s,^,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2605.       fi
  2606.       program_transform_set=yes
  2607. --- 292,298 ----
  2608.       | --program-pref=* | --program-pre=* | --program-pr=* \
  2609.       | --program-p=*)
  2610. !     arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  2611.       if [ -n "${arg}" ]; then
  2612. !       program_transform_name="${program_transform_name} -e s,^,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2613.       fi
  2614.       program_transform_set=yes
  2615. ***************
  2616. *** 281,287 ****
  2617.       | --program-suff=* | --program-suf=* | --program-su=* \
  2618.       | --program-s=*)
  2619. !     arg=`echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  2620.       if [ -n "${arg}" ]; then
  2621. !       program_transform_name="${program_transform_name} -e s,\$\$,`echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2622.       fi
  2623.       program_transform_set=yes
  2624. --- 306,312 ----
  2625.       | --program-suff=* | --program-suf=* | --program-su=* \
  2626.       | --program-s=*)
  2627. !     arg=`/bin/echo ${arg} | sed -e 's/^[-a-z_]*=//'`
  2628.       if [ -n "${arg}" ]; then
  2629. !       program_transform_name="${program_transform_name} -e s,\$\$,`/bin/echo ${arg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`,"
  2630.       fi
  2631.       program_transform_set=yes
  2632. ***************
  2633. *** 496,500 ****
  2634.       # Set this to override the default target model.
  2635.       target_cpu_default=
  2636. !     # Set this to force use of install.sh.
  2637.       broken_install=
  2638.       # Set this to control which fixincludes program to use.
  2639. --- 521,526 ----
  2640.       # Set this to override the default target model.
  2641.       target_cpu_default=
  2642. !     # Set this to force use of install.sh (if set to 'yes')
  2643. !     # Set to name of installer to use a custom installer.
  2644.       broken_install=
  2645.       # Set this to control which fixincludes program to use.
  2646. ***************
  2647. *** 1468,1471 ****
  2648. --- 1494,1507 ----
  2649.           extra_headers=math-68881.h
  2650.           ;;
  2651. +     m68k-*-amigados)
  2652. +         xm_file=m68k/xm-amigados.h
  2653. +         out_file=m68k/amigados.c
  2654. +         tm_file=m68k/amigados.h
  2655. +         tmake_file=m68k/t-amigados
  2656. +         xmake_file=m68k/x-amigados
  2657. +         fixincludes=Makefile.in # Headers are already fixed.
  2658. +         broken_install=cp
  2659. +         install_headers_dir=install-headers-cp
  2660. +         ;;
  2661.       m68k-wrs-vxworks*)
  2662.           tm_file=m68k/vxm68k.h
  2663. ***************
  2664. *** 2500,2513 ****
  2665.   rm -f specs.h options.h
  2666.   touch specs.h options.h
  2667. ! for subdir in . $subdirs
  2668.   do
  2669. !     if [ -f $srcdir/$subdir/lang-specs.h ]; then
  2670. !         echo "#include \"$subdir/lang-specs.h\"" >>specs.h
  2671. !         lang_specs_files="$lang_specs_files $subdir/lang-specs.h"
  2672. !     fi
  2673. !     if [ -f $srcdir/$subdir/lang-options.h ]; then
  2674. !         echo "#include \"$subdir/lang-options.h\"" >>options.h
  2675. !         lang_options_files="$lang_options_files $subdir/lang-options.h"
  2676. !     fi
  2677.   done
  2678.   
  2679. --- 2536,2548 ----
  2680.   rm -f specs.h options.h
  2681.   touch specs.h options.h
  2682. ! for lang_specs in $srcdir/*/lang-specs.h
  2683.   do
  2684. !     echo "#include \"$lang_specs\"" >>specs.h
  2685. !     lang_specs_files="$lang_specs_files $lang_specs"
  2686. ! done
  2687. ! for lang_options in $srcdir/*/lang-options.h
  2688. ! do
  2689. !     echo "#include \"$lang_options\"" >>options.h
  2690. !     lang_options_files="$lang_options_files $lang_options"
  2691.   done
  2692.   
  2693. ***************
  2694. *** 2615,2620 ****
  2695.       else
  2696.           rm -f Makefile.xx
  2697. !         abssrcdir=`cd ${srcdir}; pwd`
  2698. !         sed "s|^INSTALL = .*|INSTALL = ${abssrcdir}/install.sh -c|" Makefile.tem > Makefile.xx
  2699.           rm -f Makefile.tem
  2700.           mv Makefile.xx Makefile.tem
  2701. --- 2650,2661 ----
  2702.       else
  2703.           rm -f Makefile.xx
  2704. !          if [ x$host_broken_install = xyes ]
  2705. !          then
  2706. !              abssrcdir=`cd ${srcdir}; pwd`
  2707. !              installer="${abssrcdir}/install.sh -c"
  2708. !          else
  2709. !              installer=$host_broken_install
  2710. !          fi
  2711. !          sed "s|^INSTALL = .*|INSTALL = ${installer}|" Makefile.tem > Makefile.xx
  2712.           rm -f Makefile.tem
  2713.           mv Makefile.xx Makefile.tem
  2714. ***************
  2715. *** 2860,2867 ****
  2716.           if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
  2717.           then
  2718. !             sed -e 's,CC=set-by-configure,CC=$(CC),' \
  2719.                   Makefile.tem > Makefile.xx
  2720.           else
  2721. !             sed -e "s,CC=set-by-configure,CC=\`case '$(CC)' in stage*) echo '$(CC)' | sed -e 's|stage|../stage|g';; *) echo '$(CC)';; esac\`," \
  2722.                   Makefile.tem > Makefile.xx
  2723.           fi
  2724. --- 2901,2908 ----
  2725.           if $symbolic_link symtest1.tem symtest.tem 2>/dev/null
  2726.           then
  2727. !             sed -e 's,CC=set-by-configure,CC=\$(CC),' \
  2728.                   Makefile.tem > Makefile.xx
  2729.           else
  2730. !             sed -e "s,CC=set-by-configure,CC=\`case '\$(CC)' in stage*) echo '\$(CC)' | sed -e 's|stage|../stage|g';; *) echo '\$(CC)';; esac\`," \
  2731.                   Makefile.tem > Makefile.xx
  2732.           fi
  2733. diff -2rcN /usr/goinfre/gcc-2.7.0/cp/Make-lang.in gcc-2.7.0-amiga/cp/Make-lang.in
  2734. *** /usr/goinfre/gcc-2.7.0/cp/Make-lang.in    Fri Jun 16 20:09:57 1995
  2735. --- gcc-2.7.0-amiga/cp/Make-lang.in    Fri Jun 23 11:52:22 1995
  2736. ***************
  2737. *** 74,78 ****
  2738.   cxxmain.o: cplus-dem.c demangle.h
  2739.       rm -f cxxmain.c
  2740. !     ln -s $(srcdir)/cplus-dem.c cxxmain.c > /dev/null 2>&1 \
  2741.        || cp $(srcdir)/cplus-dem.c cxxmain.c
  2742.       $(CC) -c -DMAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  2743. --- 74,78 ----
  2744.   cxxmain.o: cplus-dem.c demangle.h
  2745.       rm -f cxxmain.c
  2746. !     $(SYMLINK) $(srcdir)/cplus-dem.c cxxmain.c > /dev/null 2>&1 \
  2747.        || cp $(srcdir)/cplus-dem.c cxxmain.c
  2748.       $(CC) -c -DMAIN $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
  2749. ***************
  2750. *** 122,126 ****
  2751.           chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
  2752.           rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
  2753. !         ln $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \
  2754.             > /dev/null 2>&1 \
  2755.             || cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \
  2756. --- 122,126 ----
  2757.           chmod a+x $(bindir)/$(GXX_CROSS_NAME)$(exeext); \
  2758.           rm -f $(bindir)/$(CXX_CROSS_NAME)$(exeext); \
  2759. !         $(HARDLINK) $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) \
  2760.             > /dev/null 2>&1 \
  2761.             || cp $(bindir)/$(GXX_CROSS_NAME)$(exeext) $(bindir)/$(CXX_CROSS_NAME)$(exeext) ; \
  2762. ***************
  2763. *** 130,134 ****
  2764.           chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
  2765.           rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
  2766. !         ln $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \
  2767.             > /dev/null 2>&1 \
  2768.             || cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \
  2769. --- 130,134 ----
  2770.           chmod a+x $(bindir)/$(GXX_INSTALL_NAME)$(exeext); \
  2771.           rm -f $(bindir)/$(CXX_INSTALL_NAME)$(exeext); \
  2772. !         $(HARDLINK) $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) \
  2773.             > /dev/null 2>&1 \
  2774.             || cp $(bindir)/$(GXX_INSTALL_NAME)$(exeext) $(bindir)/$(CXX_INSTALL_NAME)$(exeext) ; \
  2775. ***************
  2776. *** 194,197 ****
  2777.       cd cp; \
  2778.       for file in *[0-9a-zA-Z+]; do \
  2779. !       ln $$file ../tmp/cp >/dev/null 2>&1 || cp $$file ../tmp/cp; \
  2780.       done
  2781. --- 194,197 ----
  2782.       cd cp; \
  2783.       for file in *[0-9a-zA-Z+]; do \
  2784. !       $(HARDLINK) $$file ../tmp/cp >/dev/null 2>&1 || cp $$file ../tmp/cp; \
  2785.       done
  2786. diff -2rcN /usr/goinfre/gcc-2.7.0/cp/g++.c gcc-2.7.0-amiga/cp/g++.c
  2787. *** /usr/goinfre/gcc-2.7.0/cp/g++.c    Thu Jun 15 13:23:15 1995
  2788. --- gcc-2.7.0-amiga/cp/g++.c    Fri Jun 23 11:52:23 1995
  2789. ***************
  2790. *** 242,246 ****
  2791. --- 242,250 ----
  2792.   
  2793.     if (errno < sys_nerr)
  2794. + #ifdef HAVE_STRERROR
  2795. +     s = concat ("%s: ", strerror(errno), "");
  2796. + #else
  2797.       s = concat ("%s: ", sys_errlist[errno], "");
  2798. + #endif
  2799.     else
  2800.       s = "cannot open %s";
  2801. diff -2rcN /usr/goinfre/gcc-2.7.0/cpplib.c gcc-2.7.0-amiga/cpplib.c
  2802. *** /usr/goinfre/gcc-2.7.0/cpplib.c    Thu Jun 15 12:24:38 1995
  2803. --- gcc-2.7.0-amiga/cpplib.c    Fri Jun 23 11:52:24 1995
  2804. ***************
  2805. *** 152,155 ****
  2806. --- 152,159 ----
  2807.   static char *predefs = "";
  2808.   #endif
  2809. + #ifdef __amigados__
  2810. + static int amigados_abs_filename ();
  2811. + #endif
  2812.   
  2813.   /* We let tm.h override the types used here, to handle trivial differences
  2814. ***************
  2815. *** 3304,3308 ****
  2816. --- 3308,3317 ----
  2817.     /* If specified file name is absolute, just open it.  */
  2818.   
  2819. + /* Phil.B 10-Apr-95 check for absolute filenames */
  2820. + #ifdef __amigados__
  2821. +   if (amigados_abs_filename (fbeg, flen)) {
  2822. + #else
  2823.     if (*fbeg == '/') {
  2824. + #endif
  2825.       strncpy (fname, fbeg, flen);
  2826.       fname[flen] = 0;
  2827. ***************
  2828. *** 3327,3330 ****
  2829. --- 3336,3343 ----
  2830.         continue;
  2831.       strcpy (fname, searchptr->fname);
  2832. + /* Phil.B 10-Arp-95 Avoir foo:/ situations */
  2833. + #ifdef __amigados__
  2834. +     if (fname[strlen (fname) - 1] != ':')
  2835. + #endif
  2836.       strcat (fname, "/");
  2837.       fname[strlen (fname) + flen] = 0;
  2838. ***************
  2839. *** 3400,3403 ****
  2840. --- 3413,3420 ----
  2841.                          + strlen (fname) + 2);
  2842.                 strcpy (p, searchptr->fname);
  2843. + /* Phil.B 10-Arp-95 Avoir foo:/ situations */
  2844. + #ifdef __amigados__
  2845. +                   if (p[strlen (p) - 1] != ':')
  2846. + #endif
  2847.                 strcat (p, "/");
  2848.                 strcat (p, fname);
  2849. ***************
  2850. *** 7511,7514 ****
  2851. --- 7528,7554 ----
  2852.   }
  2853.   
  2854. + #ifdef __amigados__
  2855. + /* This function returns whether the LEN characters long filename FNAME 
  2856. +    is an absolute path specification. */
  2857. + static int
  2858. + amigados_abs_filename (fname, len)
  2859. +      char *fname;
  2860. +      int len;
  2861. + {
  2862. +   /* we're using ixemul.library, which treats `/foo' as `foo:', so 
  2863. +      fname[0] is to be considered absolute as well */
  2864. +   if (fname[0] == '/')
  2865. +     return 1;
  2866. +   /* else do an index() on fname, but one which is limited to len characters */
  2867. +   while (*fname && *fname != ':' && len) 
  2868. +     fname++, len--;
  2869. +   return *fname == ':';
  2870. + }
  2871. + #endif /* __amigados__ */
  2872.   /* TODO:
  2873.    * No pre-compiled header file support.
  2874. diff -2rcN /usr/goinfre/gcc-2.7.0/cpplib.h gcc-2.7.0-amiga/cpplib.h
  2875. *** /usr/goinfre/gcc-2.7.0/cpplib.h    Thu Jun 15 12:25:11 1995
  2876. --- gcc-2.7.0-amiga/cpplib.h    Fri Jun 23 11:52:25 1995
  2877. ***************
  2878. *** 316,319 ****
  2879. --- 316,324 ----
  2880.     char verbose;
  2881.   
  2882. + /* Phil.B 10-Apr-95 handle amiga process priority */
  2883. + #ifdef __amigados__
  2884. +   int amiga_priority;
  2885. + #endif /* __amigados__ */
  2886.     /* Nonzero means use extra default include directories for C++.  */
  2887.   
  2888. diff -2rcN /usr/goinfre/gcc-2.7.0/cppmain.c gcc-2.7.0-amiga/cppmain.c
  2889. *** /usr/goinfre/gcc-2.7.0/cppmain.c    Thu Jun 15 12:25:35 1995
  2890. --- gcc-2.7.0-amiga/cppmain.c    Fri Jun 23 11:52:25 1995
  2891. ***************
  2892. *** 33,36 ****
  2893. --- 33,41 ----
  2894.   cpp_options options;
  2895.   
  2896. + #ifdef __amigados__
  2897. + #include <proto/exec.h>
  2898. + struct Task *amiga_task;
  2899. + #endif /* __amigados__ */
  2900.   /* More 'friendly' abort that prints the line and file.
  2901.      config.h can #define abort fancy_abort if you like that sort of thing.  */
  2902. ***************
  2903. *** 53,56 ****
  2904. --- 58,70 ----
  2905.     struct cpp_options *opts = &options;
  2906.   
  2907. + #ifdef __amigados__
  2908. +   {
  2909. +     char *envstr;
  2910. +     if (envstr = getenv("GCCPRIORITY"))
  2911. +       if (((i = atoi(envstr)) > -20) && (i < 20)) opts->amiga_priority = i;
  2912. +   }
  2913. + #endif /* __amigados__ */
  2914.     p = argv[0] + strlen (argv[0]);
  2915.     while (p != argv[0] && p[-1] != '/') --p;
  2916. ***************
  2917. *** 67,70 ****
  2918. --- 81,91 ----
  2919.     parse_in.show_column = 1;
  2920.   
  2921. + #ifdef __amigados__
  2922. +   Forbid();
  2923. +   amiga_task = FindTask(NULL);
  2924. +   Permit();
  2925. +   SetTaskPri(amiga_task, opts->amiga_priority);
  2926. + #endif /* __amigados__ */
  2927.     i = push_parse_file (&parse_in, opts->in_fname);
  2928.     if (i != SUCCESS_EXIT_CODE)
  2929. diff -2rcN /usr/goinfre/gcc-2.7.0/explow.c gcc-2.7.0-amiga/explow.c
  2930. *** /usr/goinfre/gcc-2.7.0/explow.c    Thu Jun 15 12:30:10 1995
  2931. --- gcc-2.7.0-amiga/explow.c    Fri Jun 23 11:52:26 1995
  2932. ***************
  2933. *** 31,34 ****
  2934. --- 31,35 ----
  2935.   #include "insn-codes.h"
  2936.   
  2937. + rtx gen_stack_cleanup_call();
  2938.   static rtx break_out_memory_refs    PROTO((rtx));
  2939.   
  2940. ***************
  2941. *** 1096,1099 ****
  2942. --- 1097,1109 ----
  2943.       }
  2944.     else
  2945. + #endif
  2946. + #if 1 /* HAVE_stack_on_heap */
  2947. +   if (TARGET_STACKCHECK)
  2948. +     emit_insn (gen_stack_management_call
  2949. +                 (stack_pointer_rtx, size, "jbsr ___stkchk_d0"));
  2950. +   if (TARGET_STACKEXTEND)
  2951. +     emit_insn (gen_stack_management_call 
  2952. +                 (stack_pointer_rtx, size, "jbsr ___sub_d0_sp"));
  2953. +   else
  2954.   #endif
  2955.       {
  2956. diff -2rcN /usr/goinfre/gcc-2.7.0/final.c gcc-2.7.0-amiga/final.c
  2957. *** /usr/goinfre/gcc-2.7.0/final.c    Thu Jun 15 12:32:51 1995
  2958. --- gcc-2.7.0-amiga/final.c    Fri Jun 23 11:52:26 1995
  2959. ***************
  2960. *** 2039,2042 ****
  2961. --- 2039,2046 ----
  2962.     if (write_symbols != NO_DEBUG)
  2963.       {
  2964. + /* Phil.B: 03-Oct-94 added q_anote from albaugh@agames.com (Mike Albaugh) */
  2965. + #if defined(__amigados__) && defined(ASM_NOTE_SOURCE_LINE)
  2966. +   ASM_NOTE_SOURCE_LINE(file,last_linenum,filename);
  2967. + #endif
  2968.   #ifdef SDB_DEBUGGING_INFO
  2969.         if (write_symbols == SDB_DEBUG
  2970. diff -2rcN /usr/goinfre/gcc-2.7.0/fixincludes gcc-2.7.0-amiga/fixincludes
  2971. *** /usr/goinfre/gcc-2.7.0/fixincludes    Sun Jun 11 18:37:31 1995
  2972. --- gcc-2.7.0-amiga/fixincludes    Fri Jun 23 11:52:27 1995
  2973. ***************
  2974. *** 58,61 ****
  2975. --- 58,64 ----
  2976.     LINKS=false
  2977.   fi
  2978. + # AmigaDOS hack - we have symbolic links, but it's generally
  2979. + # better to not depend on them working correctly.
  2980. + LINKS=false
  2981.   
  2982.   echo Finding directories and links to directories
  2983. diff -2rcN /usr/goinfre/gcc-2.7.0/gcc.c gcc-2.7.0-amiga/gcc.c
  2984. *** /usr/goinfre/gcc-2.7.0/gcc.c    Thu Jun 15 12:38:02 1995
  2985. --- gcc-2.7.0-amiga/gcc.c    Fri Jun 23 11:52:28 1995
  2986. ***************
  2987. *** 225,228 ****
  2988. --- 225,235 ----
  2989.   static int save_temps_flag;
  2990.   
  2991. + #ifdef __amigados__
  2992. + /* Phil.B: 03-Oct-94 Flag indicating process priority */
  2993. + static int amiga_priority = 0;
  2994. + /* Phil.B: 17-Apr-95 Flag indicating stack checking */
  2995. + static int amiga_stackcheck = 0;
  2996. + #endif /* __amigados__ */
  2997.   /* The compiler version.  */
  2998.   
  2999. ***************
  3000. *** 817,820 ****
  3001. --- 824,831 ----
  3002.      {"--pipe", "-pipe", 0},
  3003.      {"--prefix", "-B", "a"},
  3004. + /* Phil.B: 03-Oct-94, allow priority settings for all programs started by gcc */
  3005. + #ifdef __amigados__
  3006. +    {"--priority", "-priority", "a"},
  3007. + #endif /* __amigados__ */
  3008.      {"--preprocess", "-E", 0},
  3009.      {"--print-search-dirs", "-print-search-dirs", 0},
  3010. ***************
  3011. *** 1348,1356 ****
  3012.   
  3013.   #ifndef STANDARD_EXEC_PREFIX
  3014. ! #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
  3015.   #endif /* !defined STANDARD_EXEC_PREFIX */
  3016.   
  3017.   static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
  3018. ! static char *standard_exec_prefix_1 = "/usr/lib/gcc/";
  3019.   #ifdef MD_EXEC_PREFIX
  3020.   static char *md_exec_prefix = MD_EXEC_PREFIX;
  3021. --- 1359,1367 ----
  3022.   
  3023.   #ifndef STANDARD_EXEC_PREFIX
  3024. ! #define STANDARD_EXEC_PREFIX "/gnu/lib/gcc-lib/"
  3025.   #endif /* !defined STANDARD_EXEC_PREFIX */
  3026.   
  3027.   static char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
  3028. ! static char *standard_exec_prefix_1 = "/local/lib/gcc-lib/";
  3029.   #ifdef MD_EXEC_PREFIX
  3030.   static char *md_exec_prefix = MD_EXEC_PREFIX;
  3031. ***************
  3032. *** 1358,1362 ****
  3033.   
  3034.   #ifndef STANDARD_STARTFILE_PREFIX
  3035. ! #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
  3036.   #endif /* !defined STANDARD_STARTFILE_PREFIX */
  3037.   
  3038. --- 1369,1373 ----
  3039.   
  3040.   #ifndef STANDARD_STARTFILE_PREFIX
  3041. ! #define STANDARD_STARTFILE_PREFIX "/gnu/lib/"
  3042.   #endif /* !defined STANDARD_STARTFILE_PREFIX */
  3043.   
  3044. ***************
  3045. *** 1368,1376 ****
  3046.   #endif
  3047.   static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  3048. ! static char *standard_startfile_prefix_1 = "/lib/";
  3049. ! static char *standard_startfile_prefix_2 = "/usr/lib/";
  3050.   
  3051.   #ifndef TOOLDIR_BASE_PREFIX
  3052. ! #define TOOLDIR_BASE_PREFIX "/usr/local/"
  3053.   #endif
  3054.   static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
  3055. --- 1379,1387 ----
  3056.   #endif
  3057.   static char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
  3058. ! static char *standard_startfile_prefix_1 = "/local/lib/";
  3059. ! static char *standard_startfile_prefix_2 = "/local/lib/";
  3060.   
  3061.   #ifndef TOOLDIR_BASE_PREFIX
  3062. ! #define TOOLDIR_BASE_PREFIX "/local/"
  3063.   #endif
  3064.   static char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
  3065. ***************
  3066. *** 1573,1576 ****
  3067. --- 1584,1591 ----
  3068.   #endif
  3069.   
  3070. + #ifdef __amigados__
  3071. +   if (!base) /* No env var set */
  3072. +     base = "RAM:";
  3073. + #else
  3074.     base = choose_temp_base_try (concat4 (dir_separator_str, "usr", 
  3075.                                           dir_separator_str, "tmp"), 
  3076. ***************
  3077. *** 1578,1581 ****
  3078. --- 1593,1598 ----
  3079.     base = choose_temp_base_try (concat (dir_separator_str, "tmp"), base);
  3080.    
  3081. + #endif
  3082.     /* If all else fails, use the current directory! */  
  3083.     if (base == (char *)0) base = concat(".", dir_separator_str);
  3084. ***************
  3085. *** 1586,1590 ****
  3086.     strcpy (temp_filename, base);
  3087.     if (len > 0 && temp_filename[len-1] != '/'
  3088. !       && temp_filename[len-1] != DIR_SEPARATOR)
  3089.       temp_filename[len++] = DIR_SEPARATOR;
  3090.     strcpy (temp_filename + len, "ccXXXXXX");
  3091. --- 1603,1611 ----
  3092.     strcpy (temp_filename, base);
  3093.     if (len > 0 && temp_filename[len-1] != '/'
  3094. !       && temp_filename[len-1] != DIR_SEPARATOR
  3095. ! #ifdef VOL_SEPARATOR
  3096. !       && temp_filename[len-1] != VOL_SEPARATOR
  3097. ! #endif
  3098. !     )
  3099.       temp_filename[len++] = DIR_SEPARATOR;
  3100.     strcpy (temp_filename + len, "ccXXXXXX");
  3101. ***************
  3102. *** 1747,1751 ****
  3103.     /* Determine the filename to execute (special case for absolute paths).  */
  3104.   
  3105. !   if (*name == '/' || *name == DIR_SEPARATOR)
  3106.       {
  3107.         if (access (name, mode))
  3108. --- 1768,1776 ----
  3109.     /* Determine the filename to execute (special case for absolute paths).  */
  3110.   
  3111. !   if (*name == '/' || *name == DIR_SEPARATOR
  3112. ! #ifdef VOL_SEPARATOR
  3113. !       || index (name, VOL_SEPARATOR)
  3114. ! #endif
  3115. !     )
  3116.       {
  3117.         if (access (name, mode))
  3118. ***************
  3119. *** 1967,1970 ****
  3120. --- 1992,1996 ----
  3121.      (i.e. its output should be piped to the next one.)  */
  3122.   
  3123. + #ifndef PEXECUTE
  3124.   #ifdef __MSDOS__
  3125.   
  3126. ***************
  3127. *** 2171,2174 ****
  3128. --- 2197,2201 ----
  3129.   }
  3130.   #endif /* OS2 or _WIN32 */
  3131. + #endif /* !defined (PEXECUTE) */
  3132.   
  3133.   
  3134. ***************
  3135. *** 2266,2272 ****
  3136. --- 2293,2305 ----
  3137.         char *string = commands[i].argv[0];
  3138.   
  3139. + #ifdef PEXECUTE
  3140. +       commands[i].pid = PEXECUTE (string != commands[i].prog,
  3141. +                   string, commands[i].argv,
  3142. +                   i + 1 < n_commands);
  3143. + #else
  3144.         commands[i].pid = pexecute (string != commands[i].prog,
  3145.                     string, commands[i].argv,
  3146.                     i + 1 < n_commands);
  3147. + #endif
  3148.   
  3149.         if (string != commands[i].prog)
  3150. ***************
  3151. *** 2291,2294 ****
  3152. --- 2324,2330 ----
  3153.       int pid;
  3154.   
  3155. + #ifdef PEXECUTE_RESULT
  3156. +     pid = PEXECUTE_RESULT (status, commands[i]);
  3157. + #else /* PEXECUTE_RESULT */
  3158.   #ifdef __MSDOS__
  3159.           status = pid = commands[i].pid;
  3160. ***************
  3161. *** 2300,2303 ****
  3162. --- 2336,2340 ----
  3163.   #endif
  3164.   #endif
  3165. + #endif /* PEXECUTE_RESULT */
  3166.       if (pid < 0)
  3167.         abort ();
  3168. ***************
  3169. *** 2419,2422 ****
  3170. --- 2456,2460 ----
  3171.           {
  3172.             strncpy (nstore, startp, endp-startp);
  3173. + #ifndef __amigados__
  3174.             if (endp == startp)
  3175.           strcpy (nstore, concat (".", dir_separator_str));
  3176. ***************
  3177. *** 2428,2431 ****
  3178. --- 2466,2478 ----
  3179.             else
  3180.           nstore[endp-startp] = 0;
  3181. + #else
  3182. +           if (endp[-1] != '/' && endp[-1] != ':')
  3183. +         {
  3184. +           nstore[endp-startp] = '/';
  3185. +           nstore[endp-startp+1] = 0;
  3186. +         }
  3187. +           else
  3188. +         nstore[endp-startp] = 0;
  3189. + #endif
  3190.             add_prefix (&exec_prefixes, nstore, 0, 0, NULL_PTR);
  3191.             if (*endp == 0)
  3192. ***************
  3193. *** 2450,2453 ****
  3194. --- 2497,2501 ----
  3195.           {
  3196.             strncpy (nstore, startp, endp-startp);
  3197. + #ifndef __amigados__
  3198.             if (endp == startp)
  3199.           strcpy (nstore, concat (".", dir_separator_str));
  3200. ***************
  3201. *** 2459,2462 ****
  3202. --- 2507,2519 ----
  3203.             else
  3204.           nstore[endp-startp] = 0;
  3205. + #else
  3206. +           if (endp[-1] != '/' && endp[-1] != ':')
  3207. +         {
  3208. +           nstore[endp-startp] = '/';
  3209. +           nstore[endp-startp+1] = 0;
  3210. +         }
  3211. +           else
  3212. +         nstore[endp-startp] = 0;
  3213. + #endif
  3214.             add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
  3215.             if (*endp == 0)
  3216. ***************
  3217. *** 2482,2485 ****
  3218. --- 2539,2543 ----
  3219.           {
  3220.             strncpy (nstore, startp, endp-startp);
  3221. + #ifndef __amigados__
  3222.             if (endp == startp)
  3223.           strcpy (nstore, concat (".", dir_separator_str));
  3224. ***************
  3225. *** 2491,2494 ****
  3226. --- 2549,2561 ----
  3227.             else
  3228.           nstore[endp-startp] = 0;
  3229. + #else
  3230. +           if (endp[-1] != '/' && endp[-1] != ':')
  3231. +         {
  3232. +           nstore[endp-startp] = '/';
  3233. +           nstore[endp-startp+1] = 0;
  3234. +         }
  3235. +           else
  3236. +         nstore[endp-startp] = 0;
  3237. + #endif
  3238.             add_prefix (&startfile_prefixes, nstore, 0, 0, NULL_PTR);
  3239.             if (*endp == 0)
  3240. ***************
  3241. *** 2510,2513 ****
  3242. --- 2577,2590 ----
  3243.     for (i = 1; i < argc; i++)
  3244.       {
  3245. + #ifdef __amigados__
  3246. +       /* Phil.B 03-Oct-94 added -priority keyword */
  3247. +       if (! strcmp (argv[i], "-priority"))
  3248. +         {
  3249. +       if (i + 1 == argc)
  3250. +         fatal ("argument to `-priority' is missing");
  3251. +           amiga_priority = atoi(argv[++i]);
  3252. +         }
  3253. +       else
  3254. + #endif /* __amigados__ */
  3255.         if (! strcmp (argv[i], "-dumpspecs"))
  3256.       {
  3257. ***************
  3258. *** 4483,4490 ****
  3259. --- 4560,4571 ----
  3260.         int len;
  3261.   
  3262. + #ifdef FILE_NAME_NONDIRECTORY
  3263. +       input_basename = FILE_NAME_NONDIRECTORY (input_filename);
  3264. + #else
  3265.         input_basename = input_filename;
  3266.         for (p = input_filename; *p; p++)
  3267.           if (*p == '/' || *p == DIR_SEPARATOR)
  3268.             input_basename = p + 1;
  3269. + #endif
  3270.   
  3271.         /* Find a suffix starting with the last period,
  3272. diff -2rcN /usr/goinfre/gcc-2.7.0/genconfig.c gcc-2.7.0-amiga/genconfig.c
  3273. *** /usr/goinfre/gcc-2.7.0/genconfig.c    Thu Jun 15 12:40:18 1995
  3274. --- gcc-2.7.0-amiga/genconfig.c    Fri Jun 23 11:52:29 1995
  3275. ***************
  3276. *** 305,310 ****
  3277. --- 305,318 ----
  3278.   from the machine description file `md'.  */\n\n");
  3279.   
  3280. + #ifdef __amigados__
  3281. +   /* this constant probably better be 14 in general, or a cross compiling
  3282. +      host might choke on some amigados header files... */
  3283. +   /* Allow at least 14 operands for the sake of asm constructs.  */
  3284. +   max_recog_operands = 14;
  3285. + #else
  3286.     /* Allow at least 10 operands for the sake of asm constructs.  */
  3287.     max_recog_operands = 9;  /* We will add 1 later.  */
  3288. + #endif
  3289.     max_dup_operands = 1;
  3290.   
  3291. diff -2rcN /usr/goinfre/gcc-2.7.0/ginclude/stdarg.h gcc-2.7.0-amiga/ginclude/stdarg.h
  3292. *** /usr/goinfre/gcc-2.7.0/ginclude/stdarg.h    Sun Apr 30 13:10:28 1995
  3293. --- gcc-2.7.0-amiga/ginclude/stdarg.h    Fri Jun 23 11:52:29 1995
  3294. ***************
  3295. *** 168,170 ****
  3296. --- 168,178 ----
  3297.   
  3298.   #endif /* not _ANSI_STDARG_H_ */
  3299. + #ifdef __amigados__
  3300. + # ifndef _VA_LIST
  3301. + #  define _VA_LIST
  3302. +    typedef __gnuc_va_list va_list;
  3303. + # endif
  3304. + #endif /* __amigados__ */
  3305.   #endif /* not _STDARG_H */
  3306. diff -2rcN /usr/goinfre/gcc-2.7.0/ginclude/stddef.h gcc-2.7.0-amiga/ginclude/stddef.h
  3307. *** /usr/goinfre/gcc-2.7.0/ginclude/stddef.h    Wed May 31 00:02:59 1995
  3308. --- gcc-2.7.0-amiga/ginclude/stddef.h    Fri Jun 23 11:52:29 1995
  3309. ***************
  3310. *** 4,7 ****
  3311. --- 4,47 ----
  3312.   #ifndef __STDDEF_H__
  3313.   
  3314. + #ifdef __amigados__
  3315. + /* GNU libc has special support in this file, 4.3bsd-net2 libc deserves that
  3316. +    just as well. The system headers are ANSI compliant, the used compiler IS
  3317. +    gcc, so it's really ok to use the system header, no reason to hassle
  3318. +    with a jungle of ifdefs. Besides, amigados is only defined if compiling
  3319. +    with host=amigados, it doesn't apply if compiling with target=amigados
  3320. +    on a different host with possibly different system headers. Same thing
  3321. +    would apply to gstdarg.h and gvarargs.h, but those headers are more
  3322. +    easily fixable than this one and I'm sick of writing the same comment
  3323. +    there as well. MW
  3324. +    Include the contents of <stddef.h> inline rather than with a #include,
  3325. +    to avoid infinite include recursion when this file is installed in
  3326. +    gcc's include directory as stddef.h.  (fnf)  */
  3327. + #define _STDDEF_H_
  3328. + #include <machine/ansi.h>
  3329. + typedef    _PTRDIFF_T_    ptrdiff_t;
  3330. + #ifdef    _SIZE_T_
  3331. + typedef    _SIZE_T_    size_t;
  3332. + #undef    _SIZE_T_
  3333. + #endif
  3334. + #ifdef    _WCHAR_T_
  3335. + typedef    _WCHAR_T_    wchar_t;
  3336. + #undef    _WCHAR_T_
  3337. + #endif
  3338. + #ifndef    NULL
  3339. + #define    NULL    0
  3340. + #endif
  3341. + #define    offsetof(type, member)    ((size_t)(&((type *)0)->member))
  3342. + #else /* not __amigados__ */
  3343.   /* Any one of these symbols __need_* means that GNU libc
  3344.      wants us just to define one data type.  So don't define
  3345. ***************
  3346. *** 238,241 ****
  3347. --- 278,283 ----
  3348.   #define __WCHAR_TYPE__ int
  3349.   #endif
  3350. + #endif /* not  __amigados__ */
  3351.   typedef __WCHAR_TYPE__ wchar_t;
  3352.   #endif
  3353. diff -2rcN /usr/goinfre/gcc-2.7.0/ginclude/varargs.h gcc-2.7.0-amiga/ginclude/varargs.h
  3354. *** /usr/goinfre/gcc-2.7.0/ginclude/varargs.h    Sun Apr 30 13:10:30 1995
  3355. --- gcc-2.7.0-amiga/ginclude/varargs.h    Fri Jun 23 11:52:30 1995
  3356. ***************
  3357. *** 185,186 ****
  3358. --- 185,193 ----
  3359.   #undef _BSD_VA_LIST
  3360.   #endif
  3361. + #ifdef __amigados__
  3362. + # ifndef _VA_LIST
  3363. + #  define _VA_LIST
  3364. +    typedef __gnuc_va_list va_list;
  3365. + # endif
  3366. + #endif /* __amigados__ */
  3367. Binary files /usr/goinfre/gcc-2.7.0/libb/libgcc.a and gcc-2.7.0-amiga/libb/libgcc.a differ
  3368. Binary files /usr/goinfre/gcc-2.7.0/libb/libm020/libgcc.a and gcc-2.7.0-amiga/libb/libm020/libgcc.a differ
  3369. Binary files /usr/goinfre/gcc-2.7.0/libm020/libgcc.a and gcc-2.7.0-amiga/libm020/libgcc.a differ
  3370. diff -2rcN /usr/goinfre/gcc-2.7.0/protoize.c gcc-2.7.0-amiga/protoize.c
  3371. *** /usr/goinfre/gcc-2.7.0/protoize.c    Thu Jun 15 12:57:09 1995
  3372. --- gcc-2.7.0-amiga/protoize.c    Fri Jun 23 11:52:30 1995
  3373. ***************
  3374. *** 884,889 ****
  3375. --- 884,894 ----
  3376.     struct default_include *p;
  3377.   
  3378. + #ifdef FILE_NAME_ABSOLUTE_P
  3379. +   if (! FILE_NAME_ABSOLUTE_P (path))
  3380. +     abort ();
  3381. + #else
  3382.     if (path[0] != '/')
  3383.       abort ();        /* Must be an absolutized filename.  */
  3384. + #endif
  3385.   
  3386.     for (p = include_defaults; p->fname; p++)
  3387. ***************
  3388. *** 1312,1316 ****
  3389. --- 1317,1325 ----
  3390.       const char *src_p;
  3391.   
  3392. + #ifdef FILE_NAME_ABSOLUTE_P
  3393. +     if (! FILE_NAME_ABSOLUTE_P (rel_filename))
  3394. + #else
  3395.       if (rel_filename[0] != '/')
  3396. + #endif
  3397.         {
  3398.           src_p = cwd2;
  3399. ***************
  3400. *** 1575,1578 ****
  3401. --- 1584,1606 ----
  3402.   }
  3403.   
  3404. + /* Use this macro to advance a char * over the filename part in a line
  3405. +    read from an aux-info file. */
  3406. + #ifndef __amigados__
  3407. + /* Version for file systems where the colon has no special meaning */
  3408. + #define ADVANCE_PAST_FILENAME(CP) \
  3409. +   while (* (CP) != ':') (CP)++
  3410. + #else
  3411. + /* Have to heuristically decide whether the colon is part of the filename
  3412. +    or whether it serves to delimit the filename from the line number. If
  3413. +    it's the latter case, then the character following the colon *must*
  3414. +    be a digit. Note that this heuristic fails if the filename starts
  3415. +    with a digit. */
  3416. + #define ADVANCE_PAST_FILENAME(CP) \
  3417. +     while ((CP)[0] != ':' || !isdigit ((CP)[1])) \
  3418. +       (CP)++;
  3419. + #endif
  3420.   /* Given a line from  an aux info file, and a time at which the aux info
  3421.      file it came from was created, check to see if the item described in
  3422. ***************
  3423. *** 1596,1601 ****
  3424.       const char *filename_start = p = l + 3;
  3425.   
  3426. !     while (*p != ':')
  3427. !       p++;
  3428.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  3429.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  3430. --- 1624,1628 ----
  3431.       const char *filename_start = p = l + 3;
  3432.   
  3433. !     ADVANCE_PAST_FILENAME (p);
  3434.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  3435.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  3436. ***************
  3437. *** 1654,1659 ****
  3438.       char *filename;
  3439.   
  3440. !     while (*p != ':')
  3441. !       p++;
  3442.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  3443.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  3444. --- 1681,1685 ----
  3445.       char *filename;
  3446.   
  3447. !     ADVANCE_PAST_FILENAME (p);
  3448.       filename = (char *) alloca ((size_t) (p - filename_start) + 1);
  3449.       strncpy (filename, filename_start, (size_t) (p - filename_start));
  3450. ***************
  3451. *** 2382,2386 ****
  3452.       char *p = aux_info_base;
  3453.   
  3454. !     while (*p != ':')
  3455.         p++;
  3456.       p++;
  3457. --- 2408,2414 ----
  3458.       char *p = aux_info_base;
  3459.   
  3460. !     /* have to make sure at least one space is following the colon to make
  3461. !        sure the colon is not part of the filename */
  3462. !     while (*p != ':' && p[1] != ' ')
  3463.         p++;
  3464.       p++;
  3465. ***************
  3466. *** 2396,2400 ****
  3467.       aux_info_second_line = p;
  3468.       aux_info_relocated_name = 0;
  3469. !     if (invocation_filename[0] != '/')
  3470.         {
  3471.       /* INVOCATION_FILENAME is relative;
  3472. --- 2424,2432 ----
  3473.       aux_info_second_line = p;
  3474.       aux_info_relocated_name = 0;
  3475. ! #ifdef FILE_NAME_ABSOLUTE_P
  3476. !     if (! FILE_NAME_ABSOLUTE_P (invocation_filename))
  3477. ! #else
  3478. !       if (invocation_filename[0] != '/')
  3479. ! #endif
  3480.         {
  3481.       /* INVOCATION_FILENAME is relative;
  3482. ***************
  3483. *** 2485,2489 ****
  3484.   
  3485.   /* Check an individual filename for a .c suffix.  If the filename has this
  3486. !    suffix, rename the file such that its suffix is changed to .C.  This
  3487.      function implements the -C option.  */
  3488.   
  3489. --- 2517,2521 ----
  3490.   
  3491.   /* Check an individual filename for a .c suffix.  If the filename has this
  3492. !    suffix, rename the file such that its suffix is changed to .cc.  This
  3493.      function implements the -C option.  */
  3494.   
  3495. ***************
  3496. *** 2494,2498 ****
  3497.     const char *filename = hp->symbol;
  3498.     int last_char_index = strlen (filename) - 1;
  3499. !   char *const new_filename = (char *) alloca (strlen (filename) + 1);
  3500.   
  3501.     /* Note that we don't care here if the given file was converted or not.  It
  3502. --- 2526,2530 ----
  3503.     const char *filename = hp->symbol;
  3504.     int last_char_index = strlen (filename) - 1;
  3505. !   char *const new_filename = (char *) alloca (strlen (filename) + 2);
  3506.   
  3507.     /* Note that we don't care here if the given file was converted or not.  It
  3508. ***************
  3509. *** 2506,2511 ****
  3510.   
  3511.     strcpy (new_filename, filename);
  3512. !   new_filename[last_char_index] = 'C';
  3513.   
  3514.     if (my_link (filename, new_filename) == -1)
  3515.       {
  3516. --- 2538,2560 ----
  3517.   
  3518.     strcpy (new_filename, filename);
  3519. !   strcat (new_filename + last_char_index, "cc");
  3520. !   
  3521. !   /* use rename(2) if available !! Update config files to include HAVE_rename
  3522. !      if the used OS provides it. Advantages are: it's atomic, it's one
  3523. !      system call compared to two. */
  3524.   
  3525. + #ifdef HAVE_rename
  3526. +   /* if the mentioned systems (POSIX 1003.1-1988) have rename(2), this has
  3527. +      to be changed to `my_rename' as well. */
  3528. +   if (rename (filename, new_filename) == -1)
  3529. +     {
  3530. +       fprintf (stderr, "%s: warning: can't rename file `%s' to `%s': %s\n",
  3531. +            pname, shortpath (NULL, filename),
  3532. +            shortpath (NULL, new_filename), my_strerror(errno));
  3533. +       errors++;
  3534. +       return;
  3535. +     }
  3536. + #else
  3537.     if (my_link (filename, new_filename) == -1)
  3538.       {
  3539. ***************
  3540. *** 2524,2527 ****
  3541. --- 2573,2577 ----
  3542.         return;
  3543.       }
  3544. + #endif
  3545.   }
  3546.   
  3547. diff -2rcN /usr/goinfre/gcc-2.7.0/real.c gcc-2.7.0-amiga/real.c
  3548. *** /usr/goinfre/gcc-2.7.0/real.c    Thu Jun 15 12:57:39 1995
  3549. --- gcc-2.7.0-amiga/real.c    Fri Jun 23 11:52:31 1995
  3550. ***************
  3551. *** 4422,4428 ****
  3552. --- 4422,4434 ----
  3553.       {
  3554.         if (sign)
  3555. + #ifdef __amigados__
  3556.       sprintf (wstring, " -Infinity ");
  3557.         else
  3558.       sprintf (wstring, " Infinity ");
  3559. + #else
  3560. +     sprintf (wstring, " -NaN ");
  3561. +       else
  3562. +     sprintf (wstring, " NaN ");
  3563. + #endif
  3564.         goto bxit;
  3565.       }
  3566. diff -2rcN /usr/goinfre/gcc-2.7.0/rtl.def gcc-2.7.0-amiga/rtl.def
  3567. *** /usr/goinfre/gcc-2.7.0/rtl.def    Thu Jun 15 13:03:32 1995
  3568. --- gcc-2.7.0-amiga/rtl.def    Fri Jun 23 11:52:32 1995
  3569. ***************
  3570. *** 705,710 ****
  3571. --- 705,712 ----
  3572.   DEF_RTL_EXPR(FLOAT_TRUNCATE, "float_truncate", "e", '1')
  3573.   
  3574. + #ifndef SUPPRESS_RTL_FLOAT_DEFINITION    /* Amiga hack - avoid clash with <exec/types.h> typedef */
  3575.   /* Conversion of fixed point operand to floating point value.  */
  3576.   DEF_RTL_EXPR(FLOAT, "float", "e", '1')
  3577. + #endif
  3578.   
  3579.   /* With fixed-point machine mode:
  3580. diff -2rcN /usr/goinfre/gcc-2.7.0/scan-types.sh gcc-2.7.0-amiga/scan-types.sh
  3581. *** /usr/goinfre/gcc-2.7.0/scan-types.sh    Mon Apr 18 08:07:12 1994
  3582. --- gcc-2.7.0-amiga/scan-types.sh    Fri Jun 23 11:52:33 1995
  3583. ***************
  3584. *** 1,3 ****
  3585. ! #! /bin/sh
  3586.   # Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
  3587.   # Emits macros definitions for these, and some other types.
  3588. --- 1,3 ----
  3589. ! #!/bin/sh
  3590.   # Deduce values of standard ANSI and POSIX types (e.g. size_t, pid_t).
  3591.   # Emits macros definitions for these, and some other types.
  3592. diff -2rcN /usr/goinfre/gcc-2.7.0/toplev.c gcc-2.7.0-amiga/toplev.c
  3593. *** /usr/goinfre/gcc-2.7.0/toplev.c    Thu Jun 15 13:09:51 1995
  3594. --- gcc-2.7.0-amiga/toplev.c    Sun Jun 25 15:45:16 1995
  3595. ***************
  3596. *** 56,59 ****
  3597. --- 56,62 ----
  3598.   #include "input.h"
  3599.   #include "tree.h"
  3600. + #ifdef __amigados__
  3601. + #define SUPPRESS_RTL_FLOAT_DEFINITION    /* Avoid <exec/types.h> and rtl.def typedef clash for "float" */
  3602. + #endif
  3603.   #include "rtl.h"
  3604.   #include "flags.h"
  3605. ***************
  3606. *** 142,145 ****
  3607. --- 145,156 ----
  3608.   static char *decl_name ();
  3609.   
  3610. + #ifdef __amigados__
  3611. + /* Phil.B: 03-Oct-94 Flag indicating process priority */
  3612. + static int amiga_priority = -1;
  3613. + static int amiga_old_priority;
  3614. + #include <proto/exec.h>
  3615. + struct Task *amiga_task;
  3616. + #endif /* __amigados__ */
  3617.   /* Name of program invoked, sans directories.  */
  3618.   
  3619. ***************
  3620. *** 540,543 ****
  3621. --- 551,555 ----
  3622.     {"writable-strings", &flag_writable_strings, 1},
  3623.     {"peephole", &flag_no_peephole, 0},
  3624. +   {"large-baserel", &flag_pic, 4},
  3625.     {"force-mem", &flag_force_mem, 1},
  3626.     {"force-addr", &flag_force_addr, 1},
  3627. ***************
  3628. *** 558,561 ****
  3629. --- 570,574 ----
  3630.     {"pic", &flag_pic, 1},
  3631.     {"PIC", &flag_pic, 2},
  3632. +   {"baserel", &flag_pic, 3},
  3633.     {"fast-math", &flag_fast_math, 1},
  3634.     {"common", &flag_no_common, 0},
  3635. ***************
  3636. *** 1361,1364 ****
  3637. --- 1374,1382 ----
  3638.     va_list ap;
  3639.   
  3640. + /* PhB 25-Jun-95: restore old process priority before exiting */
  3641. + #ifdef __amigados__
  3642. +   SetTaskPri(amiga_task, amiga_old_priority);
  3643. + #endif /* __amigados__ */
  3644.     VA_START (ap, s);
  3645.   
  3646. ***************
  3647. *** 1918,1921 ****
  3648. --- 1936,1942 ----
  3649.        char *input_name;
  3650.   {
  3651. + #ifdef FILE_NAME_NONDIRECTORY
  3652. +   char *na = FILE_NAME_NONDIRECTORY (input_name);
  3653. + #else
  3654.     int len = strlen (input_name);
  3655.     char *na = input_name + len;
  3656. ***************
  3657. *** 1928,1931 ****
  3658. --- 1949,1953 ----
  3659.         na--;
  3660.       }
  3661. + #endif
  3662.   
  3663.   #ifdef ASM_OUTPUT_MAIN_SOURCE_FILENAME
  3664. ***************
  3665. *** 3320,3323 ****
  3666. --- 3342,3348 ----
  3667.        && p[-1] != DIR_SEPARATOR
  3668.   #endif
  3669. + #ifdef VOL_SEPARATOR
  3670. +      && p[-1] != VOL_SEPARATOR
  3671. + #endif
  3672.        )
  3673.       --p;
  3674. ***************
  3675. *** 3336,3339 ****
  3676. --- 3361,3373 ----
  3677.   #endif /* RLIMIT_STACK */
  3678.   
  3679. + #ifdef __amigados__
  3680. +   {
  3681. +     char *envstr;
  3682. +     if (envstr = getenv("GCCPRIORITY"))
  3683. +       if (((i = atoi(envstr)) > -20) && (i < 20)) amiga_priority = i;
  3684. +   }
  3685. + #endif /* __amigados__ */
  3686.     signal (SIGFPE, float_signal);
  3687.   
  3688. ***************
  3689. *** 3581,3584 ****
  3690. --- 3615,3631 ----
  3691.         else if (!strcmp (str, "pedantic-errors"))
  3692.           flag_pedantic_errors = pedantic = 1;
  3693. + #ifdef __amigados__
  3694. +       else if (!strcmp (str, "priority"))
  3695. +         {
  3696. +           char *p = str + 1;
  3697. +           if (*p)
  3698. +         amiga_priority = atoi (p);
  3699. +               if (amiga_priority < -25)
  3700. +             amiga_priority = -25;
  3701. +               else if (amiga_priority > 25)
  3702. +             amiga_priority = 25;
  3703. +         }
  3704. + #endif /* __amigados__ */
  3705.         else if (!strcmp (str, "quiet"))
  3706.           quiet_flag = 1;
  3707. ***************
  3708. *** 3830,3833 ****
  3709. --- 3877,3887 ----
  3710.       }
  3711.   
  3712. + #ifdef __amigados__
  3713. +   Forbid();
  3714. +   amiga_task = FindTask(NULL);
  3715. +   Permit();
  3716. +   amiga_old_priority = SetTaskPri(amiga_task, amiga_priority);
  3717. + #endif /* __amigados__ */
  3718.     /* Initialize for bytecode output.  A good idea to do this as soon as
  3719.        possible after the "-f" options have been parsed. */
  3720. ***************
  3721. *** 3916,3920 ****
  3722.     compile_file (filename);
  3723.   
  3724. ! #if !defined(OS2) && !defined(VMS) && !defined(_WIN32)
  3725.     if (flag_print_mem)
  3726.       {
  3727. --- 3970,3974 ----
  3728.     compile_file (filename);
  3729.   
  3730. ! #if !defined(OS2) && !defined(VMS) && !defined(_WIN32) && !defined (__amigados__)
  3731.     if (flag_print_mem)
  3732.       {
  3733. ***************
  3734. *** 3934,3938 ****
  3735.   #endif /* not USG */
  3736.       }
  3737. ! #endif /* not OS2 and not VMS and not _WIN32 */
  3738.   
  3739.     if (errorcount)
  3740. --- 3988,3998 ----
  3741.   #endif /* not USG */
  3742.       }
  3743. ! #endif /* not OS2 and not VMS and not _WIN32 and not __amigados__ */
  3744. ! /* PhB 25-Jun-95: restore old process priority before exiting */
  3745. ! #ifdef __amigados__
  3746. !   SetTaskPri(amiga_task, amiga_old_priority);
  3747. ! #endif /* __amigados__ */
  3748.   
  3749.     if (errorcount)
  3750.